Posterous
cvk is using Posterous to post everything online. Shouldn't you?
Me_cup_thumb
 

cvk | nc -l -p 80

« Back to blog

Caching a slow block of Ruby code with almost no effort

This is a method I use when working with slow ruby scripts that operate on huge datasets.

It caches the return value of a block of extremely slow code in a file so that subsequent runs are fast.

It's indispensable to me when doing edit-debug-edit-debug-edit cycles on giant datasets.

 
To leave a comment on this posterous, please login by clicking one of the following.
Posterous-login     Connect     twitter