Return to Snippet

Revision: 5541
at March 13, 2008 18:55 by cczona


Initial Code
"The lessons here are:

   1. Temporary strings and temporary objects will stockpile. Just because you leave a method doesn't mean they are gone....
   2. Arrays, hashes, objects are memory cheap. Worry about your strings. Do you have string corpses everywhere?
   3. Build your object from all the pieces, avoiding temporary objects as much as possible. Then, when you're done with it, toss the big object out of scope at once!"

Initial URL
http://whytheluckystiff.net/articles/theFullyUpturnedBin.html

Initial Description

                                

Initial Title
optimize Ruby memory usage by avoiding string accumulation

Initial Tags
ruby

Initial Language
Ruby