inkscape 20sec on unselect with node tool a long nodes path

Bug #1652100 reported by Jabiertxof
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Undecided
Patrick Storz

Bug Description

Hi inkscape frezze on node tool unselect, select is about 1/2 sec in my machine, unselect moe than twenty. Hapends in trunk r.15348 and in 0.92.x. r.15276

Original reported by CR with the link to the test file. I try today to fix and no look, seems deleting __mmap std::map<ShapeRecord, boost::shared_ptr<PathManipulator> > is too slow in this case. I try to fix but no lucky :(.

Jabiertxof (jabiertxof)
description: updated
Jabiertxof (jabiertxof)
description: updated
description: updated
su_v (suv-lp)
tags: added: node-editing performance
Revision history for this message
Martin Owens (doctormo) wrote :
description: updated
Revision history for this message
su_v (suv-lp) wrote :

Based on tests with archived builds (on OS X 10.7.5):
- not reproduced with Inkscape 0.91,
- not reproduced with lp:inkscape rev <= 14527,
- reproduced with lp:inkscape rev >= 14537,
- reproduced with Inkscape 0.92pre4;
the slow tool switch / deselection of nodes in the node tool context possibly was exposed by changed between 14527 and 14537:
https://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/changes/14537

Changed in inkscape:
status: New → Confirmed
tags: added: regression
Revision history for this message
Martin Owens (doctormo) wrote :

I've located the change that is most likely the culprit:

https://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/revision/14529#src/display/sp-canvas.cpp

Look at lines 1036 in the diff. Commenting out 'items->remove(item);' increases the speed of trunk an awful lot. It brings the de-selection time down to the selection time, which is about right.

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

From LiamW: well you can't just comment out the line, you'll get hilarious dangling pointer errors later on.

So we'll probably have to pick through the problem some more.

JEREMY perono (jaypee)
Changed in inkscape:
assignee: nobody → JEREMY perono (jaypee)
Mc (mc...)
Changed in inkscape:
assignee: JEREMY perono (jaypee) → nobody
Revision history for this message
Patrick Storz (ede123) wrote :

Mc and I figured out why the commit mentioned in #3 regressed performance.

I just committed a fix in
  https://gitlab.com/inkscape/inkscape/commit/8052d8eadcfa0201ee0ec7a1230bbf91c470da79
which should restore previous performance.

As this shows the data structure used here is not ideal some further optimizations in this code might be possible in future.

Changed in inkscape:
status: Confirmed → Fix Committed
assignee: nobody → Eduard Braun (eduard-braun2)
milestone: none → 0.93
tags: added: backport-proposed
Revision history for this message
Christopher M. Rogers (cajhne) wrote : Re: [Bug 1652100] Re: inkscape 20sec on unselect with node tool a long nodes path

Oh my god, thank you! Much much better! with 14,347 nodes it now only
takes 4.5 seconds to come out of node editing mode. That's quite an
improvement!

Thanks everyone for taking a look at this.
-C

On Mon, Mar 12, 2018 at 6:43 PM, Eduard Braun <email address hidden> wrote:
> Mc and I figured out why the commit mentioned in #3 regressed
> performance.
>
> I just committed a fix in
> https://gitlab.com/inkscape/inkscape/commit/8052d8eadcfa0201ee0ec7a1230bbf91c470da79
> which should restore previous performance.
>
> As this shows the data structure used here is not ideal some further
> optimizations in this code might be possible in future.
>
> ** Changed in: inkscape
> Status: Confirmed => Fix Committed
>
> ** Changed in: inkscape
> Assignee: (unassigned) => Eduard Braun (eduard-braun2)
>
> ** Changed in: inkscape
> Milestone: None => 0.93
>
> ** Tags added: backport-proposed
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1652100
>
> Title:
> inkscape 20sec on unselect with node tool a long nodes path
>
> Status in Inkscape:
> Fix Committed
>
> Bug description:
> Hi inkscape frezze on node tool unselect, select is about 1/2 sec in
> my machine, unselect moe than twenty. Hapends in trunk r.15348 and in
> 0.92.x. r.15276
>
> Original reported by CR with the link to the test file. I try today to
> fix and no look, seems deleting __mmap std::map<ShapeRecord,
> boost::shared_ptr<PathManipulator> > is too slow in this case. I try
> to fix but no lucky :(.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/inkscape/+bug/1652100/+subscriptions

Revision history for this message
Patrick Storz (ede123) wrote :
Patrick Storz (ede123)
Changed in inkscape:
milestone: 0.93 → 0.92.4
Patrick Storz (ede123)
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.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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