in reply to tuning hash memory usage
What I did was searlize all the objects in the hash. When I needed to access them I re-inflated them into full-fledged objects. Depending on your data you could even use on-disk storage (like a tied dbm file, or even a real DB) for the objects; only pulling into memory the ones you need. When I used this technique I did not go as far as to use on-disk storage for the data elements, but by just searilizing them I cut down my memory usage by nearly %75; of course, it took about twice as long to run. I used Storable, but there are several other good perl modules out there that can searilize your objects.
|
|---|