Regarding memory usage when embedding pictures
Hi everyone !
First : thanks again to everyone involved for this great piece of software !
Sorry for all those bugreports about memory usage I made before (https://bugs.launchpad.net/inkscape/+bug/706294 regarding memory filled when using patterns and https://bugs.launchpad.net/inkscape/+bug/708274 regarding a slight memory increase without doing anything particular :-) But I may need to fill another one :
I stumbled upon a particular situation yesterday, and I would like to know if you think this is an Inkscape issue, or just a twisted use case.
I wanted to import about 35 jpg pictures (from an old digital camera, so not huge resolutions but still). Inkscape managed to import and display them. I moved them onto the canvas and worked for about 2 minutes and then my hardisk started spinning tremendously, and the kernel shot down Inkscape. (I have no SWAP and 4 GB or ram)
I tried to load my document again, and noticed Inscape was almost filling my 4 GB of ram. I tried to do the very same thing with OpenOffice draw and the memory usage was "only" of 0.7 GB.
I definitely guess Inkscape is not meant for importing tons of pictures, but I was wondering whether there was some kind of memory leak or waste triggered by this particular scenario and if you think I should make another bugreport ?
(BTW, as I told suv, I would love to contribute to "bounties" to help improve Inkscape -- regarding tasks that wouldn't be performed otherwise, like tedious memory optimization... :-)
Cheers ! Mahen
On 6/2/11 13:01, Mahen wrote:
I stumbled upon a particular situation yesterday, and I would like to know if you think this is an Inkscape issue, or just a twisted use case.
I wanted to import about 35 jpg pictures (from an old digital camera, so not huge resolutions but still). Inkscape managed to import and display them. I moved them onto the canvas and worked for about 2 minutes and then my hardisk started spinning tremendously, and the kernel shot down Inkscape. (I have no SWAP and 4 GB or ram)
I tried to load my document again, and noticed Inscape was almost filling my 4 GB of ram. I tried to do the very same thing with OpenOffice draw and the memory usage was "only" of 0.7 GB.
- Did you link or embed the jpg images? - What console messages do you get when Inkscape crashes?
Possibly related:
Bug #597689 Memory leak when showing/hiding embedded images. https://bugs.launchpad.net/inkscape/+bug/597689
Bug #414413 [Win32] Crashes when working with imported bitmaps https://bugs.launchpad.net/inkscape/+bug/414413
Depending on the console error messages you get, see also the reports I tried earlier to compile as a list in an earlier thread under a): http://thread.gmane.org/gmane.comp.graphics.inkscape.devel/34560/focus=34564
~suv
On Feb 6, 2011, at 4:01 AM, Mahen wrote:
I tried to load my document again, and noticed Inscape was almost filling my 4 GB of ram. I tried to do the very same thing with OpenOffice draw and the memory usage was "only" of 0.7 GB.
I definitely guess Inkscape is not meant for importing tons of pictures, but I was wondering whether there was some kind of memory leak or waste triggered by this particular scenario and if you think I should make another bugreport ?
Yes, memory use was a major factor discussed when we were going over linked vs. embedded. If you were seeing this while linking in the images, we'll have a larger problem. On the other hand if the images were actually embedded, some such bloat was expected. This is part of why the consensus was to avoid switching to always embedding until we had such issues covered, but someone went ahead and flipped things in the code anyway.
To get a rough idea of memory use, just multiple image width in pixels by height in pixels times four and you get the rough minimum buffer needs. Also add in on-disk image file size times four and divided by three. This gives the string size needed for the XML string embed itself.
So the first question is are they linked or are they embedded. Second question is if you calculate the rough memory needs for all of those 35 images do they start to hit the limits of your machine?
participants (3)
-
Jon Cruz
-
Mahen
-
~suv