Various praise/comments/rants about Troy, RPI, PhDs, Macs, and life in general.
Thursday, August 07, 2008
Garbage Collection bites me in the ass (take 2)
OK, so I thought maybe Garbage Collection was going to work out well for me. It did - for a while. When my network size was relatively small (~20 nodes) everything worked great. Crank that up to 50, not so great. 100, and depending on the random network layout, one simulation would take 90 minutes and 2GB of RAM. Not good. I decided to re-write it w/o GC using good old-fashioned retain counts. The good part about this is it gave me an opportunity to play with Instruments, Apple's all-purpose optimizer/bug finder/etc. Leaks is awesome and today I've slowly been taking my memory footprint down from 2GB to 10-20 MB instead - much better - and faster, too! So take the time to learn a little bit about Instruments. You'll be glad you did.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment