in reply to Re^2: A way to see how much 'memory' a program will take up in, say, mod_perl, so I can start to optimize it?
in thread A way to see how much 'memory' a program will take up in, say, mod_perl, so I can start to optimize it?
Profile, then find the worst offending areas, and target them. Perhaps a better data structure, or a different algorithm would change the usage.
Update: Perhaps one of the Devel::Size type modules might help with this.
Some algorithms have more memory overhead but run faster. Others run more slowly, but take less memory.
A contract I am doing right now has frozen data in a database (basically a key/value setup with a frozen representation of a HoHoHoH... structure as the value), Some of the values are causing the application to run out of memory when being processed. By making each level of the hash another column and letting the database do much of the heavy lifting, I am saving memory, hopefully saving time (not needing to thaw the large data structure), and making a much more scalable application.
In summary, the algorithm and data structure can make a tremendous difference.
--MidLifeXis
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: A way to see how much 'memory' a program will take up in, say, mod_perl, so I can start to optimize it?
by MashMashy (Sexton) on Feb 19, 2009 at 19:23 UTC |