suspected memory leakage in move to layer command

Bug #1515971 reported by Anonymous
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
High
Mc

Bug Description

Observation:
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!

Revision history for this message
Anonymous (susi-8888) wrote :
su_v (suv-lp)
tags: added: layers performance
Changed in inkscape:
importance: Undecided → High
Revision history for this message
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
Revision history for this message
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...)
Revision history for this message
Mc (mc...) wrote :

(pushed in r14528)

Changed in inkscape:
status: Triaged → Fix Committed
Revision history for this message
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
Revision history for this message
Mc (mc...) wrote :

Not hard at all, it should apply without any modification

jazzynico (jazzynico)
tags: added: backport-proposed
Revision history for this message
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!

Revision history for this message
Mc (mc...) wrote :

Only r14528. (the three-lines diff)

r14530 is related to r14520.

Revision history for this message
Martin Owens (doctormo) wrote :

This has already been backported. Tag removed.

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.