Re: [Inkscape-devel] Memory Problems
Results of comparing zoomed out with regular zoom:
regular: memory percent: 6.6% -> 23.6% buffers/cache: 224 -> 310
zoomed out: memory percent: 5% -> 12.5% buffers/cache: 217 -> 254
The zoomed out numbers are very similar to the numbers for just previewing each file. So it appears that you are correct that the memory problem is in the renderer.
On Sat, 2005-05-07 at 11:32 -0300, bulia byak wrote:
Interesting, this means that normal loading is indeed different enough from previewing, memory-wise. We had assumed it's mostly the same, so we didn't test multiple file loading except via previews (to my knowledge).
It may be that the source of the leaking is the renderer, which may leak more memory for full-screen display than for generating previews (even though the same renderer is used in both cases). Can you please try one more experiment: in all your files, zoom out to minimum zoom and save them under different names with that zoom. Then, load them all normally one after the other into the same Inkscape instance. If the renderer is the culprit, this should have some measurable effect on memory consumption.
On 5/7/05, Richard Kowalczyk <richk@...805...> wrote:
I just tried what you suggested, and it seems to use significantly less memory.
I had some different apps open this time, so I can't compare it exactly with my previous tests, but here is a rough comparison:
opening all files: memory percent: 7% -> 45% buffers/cache: 214 -> 435
opening and closing the previous: memory percent: 5.9% -> 27.9% buffers/cache: 231 -> 342
inkview: memory percent: 3.5% -> 21.9% buffers/cache: 226 -> 327
inkscape preview window: memory percent: 5% -> 13% buffers/cache: 337 -> 372
So just previewing the files seems to use up significantly less memory than even inkview.
On Sat, 2005-05-07 at 10:58 -0300, bulia byak wrote:
Richard, can you also try this: in the Open dialog, just select these files one by one, so that a preview of each one is shown, and see if there's a memory difference at the end. (Each preview loads and renders the entire document.) I do remember that we fixed, at least partially, the memory leaking when going through previews in this way. So what you describe may be explained by: 1) our not fixing the leaks completely, only partially, or 2) Inkscape using a different and not-yet-fixed load path when loading the document fully than when doing a preview.
Mental, can you comment?
On 5/5/05, Richard Kowalczyk <richk@...805...> wrote:
I tried doing what you suggested. I went though 26 slides, since it seemed to be enough to get an indication of the behavior.
(Just to clarify - I opened the next one (from within the current one), then closed the current one - if I had closed the current one first, the memory would be cleared)
The memory used seems to be roughly equivalent between inkscape and inkview, although inkview does use less. Either way though, the memory keeps going up as I go through more slides.
I attached three files to this email - the result of doing the command:
ps aux | grep -e "inkview" >> memory.txt; free -m >> memory.txt
for three cases:
memory_inkview.txt: after I clicked the right arrow to advance each slide, I ran the command.
memory_one_per_time.txt: I did what you suggested, and opened each file in inkscape, then closed the old one, running the command for each new file.
memory_all_open.txt: I opened each file in inkscape, but didn't close the previous file, so by the end, I had 26 files open at once. I ran the command after each file was opened.
Thanks for your help, Rich.
On Thu, 2005-05-05 at 19:38 -0300, bulia byak wrote:
On 5/5/05, Richard Kowalczyk <richk@...805...> wrote:
I will be glad to do anything else that anyone thinks will help explain the memory usage.
Can you try loading these same files in turn (i.e. closing the previous one when loading the next) into Inkscape instead of Inkview and see if there is a noticeable difference?
-- Richard Kowalczyk <richk@...805...>
-- Richard Kowalczyk <richk@...805...>
This SF.Net email is sponsored by: NEC IT Guy Games. Get your fingers limbered up and give it your best shot. 4 great events, 4 opportunities to win big! Highest score wins.NEC IT Guy Games. Play to win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20 _______________________________________________ Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel
On Sat, 2005-05-07 at 11:51, Richard Kowalczyk wrote:
Results of comparing zoomed out with regular zoom:
regular: memory percent: 6.6% -> 23.6% buffers/cache: 224 -> 310
zoomed out: memory percent: 5% -> 12.5% buffers/cache: 217 -> 254
The zoomed out numbers are very similar to the numbers for just previewing each file. So it appears that you are correct that the memory problem is in the renderer.
Given this behavior, my guess is a memory leak the tile cache -- rendering a larger image will use more tiles.
It's too bad the output of ps can only give you a ballpark idea; if we could get exact numbers on the amount of memory leaked[1] I could probably confirm this up-front.
The two places to look are src/display/sp-canvas.cpp, and src/display/nr-arena-item.cpp. I dan't remember whether the cache is currently enabled in the latter.
-mental
[1] I do have some additional memory debugging facilities planned, but I probably won't have them finished right away.
participants (2)
-
MenTaLguY
-
Richard Kowalczyk