Huge Memory consumption by extension and pipe not closed
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Inkscape |
Invalid
|
Medium
|
Unassigned | ||
Mandriva |
New
|
Undecided
|
Unassigned | ||
inkscape (Arch Linux) |
New
|
Undecided
|
Unassigned | ||
inkscape (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Hi,
I was just playing around the different extension and I come to know a strange result.
As per my understanding about Inkscape extension is as below.
When any extesnion apply it creates temp. file in /tmp folder (in Linux) with extension effect and copy the temp. file using copy_doc function (in script.cpp_ file.
Now to just play around I just comment the line
copy_doc(
from script.cpp file, now this will not display extension result on the screen but open pipes(fifo) to run the script, now every time pipes open to run the script as child process, but this pipes are not closed hence after some time it will give error as
Can't Spawn!!! spawn returns: Failed to create pipe for communicating with child process (Too many open files
which is why max. file descriptor limit reached.
So this is one thing about pipes.
Now second thing is huge memory consumption, to generate the scenario please do the steps as below.
Open Inkscape
Go to extension-
Now Just click Apply
Now if you just applying the same plugin again and again inkscape memory will keep increasing, and If we delete the resulting effect by extension then also it is not getting free.
You can also apply different extension to generate the same memory issue. I did it on inkscape version 0.84.4 on Ubuntu 10.04 and Ubuntu 12.04 and results are same.
Now I have debug the things and I found that when extension create new file and it is copied using copy_doc into original doc at that time inkscape also create Root, Metadata, namedview element, which is I think inkscape default, that creates when inkscape start and they will remain in memory until inkscape exit.
So I think when new svg copied to the original at that time it start eating memory.
I was behind this from last 2 days and while searching for memory leak issue when applying extension, I found this.
I don't know how to contact developer, But If you give me more hints I can give you better testing feedback. In this bug If you require further details, please let me know. Also please let me know If there is any quick work around are possible to reduce memory usage.
tags: |
added: extensions-plugins performance removed: memory pipe |
Can somebody please conform the behaviour? Please let me know if you require further information.