Fills >8G of RAM opening a small SVG file
Bug #1533058 reported by
Mathelier
This bug affects 13 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Inkscape |
Fix Released
|
High
|
Liam P. White |
Bug Description
I am using Inkscape 0.91 r (Oct 19 2015) on Ubuntu 15.10. When trying to open a small file of ~600kB, inkscape fills more than 8G of RAM (filling out my RAM). After filling 4G of swap, the GUI is killed. You can find enclosed the file causing the problem.
When opening some larger other files (>1Mb), it seems to work fine though.
Changed in inkscape: | |
milestone: | 0.91.1 → 0.92 |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Inspecting the provided test case: matplotlib. org/) --> miterlimit: 100000
1) The original SVG document was created with matplotlib:
<!-- Created with matplotlib (http://
2) It uses a huge stroke miter limit property all over the file (probably originating from the embedded stylesheet, and copied to the style attribute of individual objects by Inkscape after editing the content:
stroke-
After removing the huge stroke-miterlimit properties from the file (externally edited in vim), the document loads quickly and without excessive memory usage in Inkscape 0.91 on OS X 10.7.5 (see attached modified version of the provided SVG file).
-- www.w3. org/TR/ SVG11/painting. html#StrokeMite rlimitProperty
[1] The default value for stroke-miterlimit is '4' (AFAICT sufficient for many or most use cases - I rarely had a need to increase it to more than 10 - if at all).
http://
AFAIU the value for the stroke-miterlimit can directly affect Inkscape's performance via (visual) bounding box calculations - 100'000 as miter limit seems excessive to me, and I wonder where this value originates from (or why it is set so high for the default stroke style) ...