Performance regression in trunk when selecting many objects

Bug #1666714 reported by su_v on 2017-02-21
This bug affects 1 person
Affects Status Importance Assigned to Milestone

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.

su_v (suv-lp) wrote :

Test files.

su_v (suv-lp) wrote :

Proposed patch by Mc (shared on irc as ).

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) on 2017-02-22
Changed in inkscape:
assignee: nobody → Mc (mc...)
importance: Undecided → High
milestone: none → 0.93
status: New → In Progress
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.

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.

Mc (mc...) wrote :

Committed to r15556

Changed in inkscape:
status: In Progress → Fix Committed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers