
On Fri, 2004-10-08 at 18:31, bulia byak wrote:
- Why does inkscape explode in RAM so much? Basically if I have an 800k
document, why would inkscape be using 133megs of RAM (not always, but if working with it for like 30mins), vs a smaller (500k) document that only uses like 40megs.
Because the new garbage collector does not free the memory unless asked or unless it runs into a limit. So, yes, it tends to take a huge pile of memory, but it can free most of it if e.g. you launch another application. This is an area where more debugging is needed, though.
Well, no. The garbage collector isn't sensitive to external memory pressure (e.g. from starting another application), and the limit in question is just whenever the number of bytes collected exceeds some percentage of the total (garbage-collected) heap size.
The truth is that we're just fairly memory-hungry. The infinite undo list always requires some memory, of course (particularly if you're working with complex paths -- every minor edit currently creates a new copy of the entire path string -- another reason for AST), and the particular document structure can affect the amount of memory required as well.
Also, if he's using 0.39, that did not have the collector, but it did have a number of memory leaks that I fixed in CVS when I was trying to get export fixed for you.
-mental