Performance regression in trunk when selecting many objects

Bug #1666714 reported by su_v
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
High
Mc

Bug Description

Selecting many objects (with Ctrl+A or drag-select) in current trunk takes too long compared to current stable 0.92.x, and tends - depending on the number of objects - to hang inkscape (while memory usage keeps growing). The reported regression can be reproduced in regular GUI sessions as well as on the command line with verbs.

Test cases (attached):
- 625 rectangles (fill, no stroke)
- 1250 rectangles (fill, no stroke)
- 2500 rectangles (fill, no stroke)

Timed results with lp:inkscape/0.92.x r15371 and lp:inkscape r15470:
$ time ink092x --verb=EditSelectAll --verb=FileQuit --file 625-rects-092x.svg

real 0m2.700s
user 0m2.241s
sys 0m0.149s
$ time inktrunk --verb=EditSelectAll --verb=FileQuit --file=625-rects-092x.svg

real 0m8.863s
user 0m8.290s
sys 0m0.206s
$ time ink092x --verb=EditSelectAll --verb=FileQuit --file=1250-rects-092x.svg

real 0m2.828s
user 0m2.504s
sys 0m0.114s
$ time inktrunk --verb=EditSelectAll --verb=FileQuit --file=1250-rects-092x.svg

real 0m27.607s
user 0m26.494s
sys 0m0.390s
$ time ink092x --verb=EditSelectAll --verb=FileQuit --file=2500-rects-092x.svg

real 0m3.910s
user 0m3.497s
sys 0m0.180s
$ time inktrunk --verb=EditSelectAll --verb=FileQuit --file=2500-rects-092x.svg

real 2m38.426s
user 2m32.760s
sys 0m1.141s
$

All tests done with local builds on Ubuntu 14.04.5 LTS.

Revision history for this message
su_v (suv-lp) wrote :

Test files.

Revision history for this message
su_v (suv-lp) wrote :

Proposed patch by Mc (shared on irc as http://paste.debian.net/914822/ ).

Timed tests with patched lp:inkscape r15537 are almost down to the timed results of 0.92.x:
$ time inktrunk-build --verb=EditSelectAll --verb=FileQuit --file=625-rects-092x.svg

real 0m3.874s
user 0m3.315s
sys 0m0.214s
$ time inktrunk-build --verb=EditSelectAll --verb=FileQuit --file=1250-rects-092x.svg

real 0m4.092s
user 0m3.586s
sys 0m0.212s
$ time inktrunk-build --verb=EditSelectAll --verb=FileQuit --file 2500-rects-092x.svg

real 0m5.122s
user 0m4.578s
sys 0m0.179s
$

jazzynico (jazzynico)
Changed in inkscape:
assignee: nobody → Mc (mc...)
importance: Undecided → High
milestone: none → 0.93
status: New → In Progress
Revision history for this message
jazzynico (jazzynico) wrote :

Reproduced on Xubuntu 16.04, lp:inkscape rev. 15537.

Note that selecting with 0.91 was almost instantaneous, even with the 2500 rectangles file and on a slow computer.

Revision history for this message
jazzynico (jazzynico) wrote :

Patch tested successfully on Xubuntu 16.04.

The trunk version is a lot faster with the patch, but the difference with 0.92 is still noticeable on a slow computer. And 0.92 already introduced performance regressions compared to 0.91.

Note that the issue also affects performances when moving the selection.

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

Committed to r15556

Changed in inkscape:
status: In Progress → Fix Committed
Max Gaukler (mgmax)
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.