suspected memory leakage in move to layer command

Bug #1515971 reported by Anonymous on 2015-11-13
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

marking a lot of entities (around 15.000), right click -> "move to layer" -> select layer results in becoming very low and in parallel in an ongoing increase of memory usage.
For example, with the attached file, memory usage starts at approx 400 Megabytes, and increases up to approx. 4.250 Megabytes if I try to move approx. 5400 of these elements with this method to another layer.....
(Just while doing this InksSape crashes and shut down...)

Version: InkScape 0.91 r13725 (64 bit) and OS Windows 7 prof, 8 GB RAM
Attached I provide a file with approx 15.000 lines on two layers...., where I was able to observe this behavior too.

Anyway, thanks to everybody for this excellent piece of Software!

su_v (suv-lp) on 2015-11-13
tags: added: layers performance
Changed in inkscape:
importance: Undecided → High
jazzynico (jazzynico) wrote :

Confirmed on Windows XP, Inkscape trunk rev. 14527.
Inkscape eats all available memory and crashes.
Not sure it's exactly a memory leak, but at least we have a performance et memory consumption issue.

Changed in inkscape:
status: New → Triaged
Mc (mc...) wrote :

The issue was the following :
For each one of the 10⁴ elements to delete from the layer 1 to put on layer 2, it had to delete its selection cue, and finding each of them, linearly within the 10⁴ (z-ordered) was taking O(10⁸) operations, ie forever(i think it would not have taken more than a few hours). Solved(takes 13s now) by deselecting the elements before deleting them from the origin layer (same as what is done in deletion code)

Changed in inkscape:
assignee: nobody → Mc (mc...)
Mc (mc...) wrote :

(pushed in r14528)

Changed in inkscape:
status: Triaged → Fix Committed
jazzynico (jazzynico) wrote :

Thanks Mc!

I haven't checked your patch yet, but how hard would it be to backport it to the 0.91.x branch?

Changed in inkscape:
milestone: none → 0.92
Mc (mc...) wrote :

Not hard at all, it should apply without any modification

jazzynico (jazzynico) on 2015-12-13
tags: added: backport-proposed
jazzynico (jazzynico) wrote :

Well, ok, but I see the patch is spread in different revisions... Could you please confirm only rev. 14528 and 14530 are relevant (and NOT 14529)? Thanks!

Mc (mc...) wrote :

Only r14528. (the three-lines diff)

r14530 is related to r14520.

Martin Owens (doctormo) wrote :

This has already been backported. Tag removed.

tags: removed: backport-proposed
Bryce Harrington (bryce) on 2017-01-10
Changed in inkscape:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers