Bug 419738 - Selection marching ants preview severely delayed.
Summary: Selection marching ants preview severely delayed.
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Tools/Selection (show other bugs)
Version: nightly build (please specify the git hash!)
Platform: Microsoft Windows Microsoft Windows
: NOR minor
Target Milestone: ---
Assignee: Dmitry Kazakov
URL:
Keywords:
: 414310 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-04-06 17:26 UTC by Ralek Kolemios
Modified: 2020-05-06 09:14 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Selection timings (196.54 KB, video/webm)
2020-04-24 13:23 UTC, Ralek Kolemios
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ralek Kolemios 2020-04-06 17:26:47 UTC
At any point in time that Krita has to render or re-render the selection preview outline (marching ants), it takes a non-insignificant amount of time to actually show up. Sometimes taking twice as long or more than the selection function itself.
While the actual selection is pretty snappy, on more than one occasion I began to paint on the canvas before the selection showed up. My stroke wouldn't register, and I'd be left confused until the marching ants finally showed up and I realized I was painting outside of the selection.
This applies to any time it needs to be recalculated, including post-transformation, magic wand, and similar color select tool.
Comment 1 wolthera 2020-04-24 12:16:01 UTC
Can you please share a video or example document with this? It's rather hard to reproduce with any given test file.
Comment 2 Ralek Kolemios 2020-04-24 13:23:24 UTC
Created attachment 127835 [details]
Selection timings

Gladly, see attached
Comment 3 Ralek Kolemios 2020-04-24 13:24:35 UTC
Setting to reported since I can't seem to find a way without commenting again.
Comment 4 Dmitry Kazakov 2020-04-24 13:34:12 UTC
Hi, Aaron!

What is the size of the image? I guess all that extra time is spent on scanning the raster image and generating vector outline out of it.
Comment 5 Ralek Kolemios 2020-04-24 16:33:00 UTC
I generally work at resolutions over 2500x2500, but it seems to take just as long with resolutions as low as 100x100, as I've just tested.
Comment 6 Dmitry Kazakov 2020-04-24 17:43:25 UTC
Okay, I see that we have a special 500ms delay before updating the outline. I should check why it was added
Comment 7 wolthera 2020-04-25 10:04:45 UTC
Just for admin purposes: There's a slight chance that this bug might be a duplicate: https://bugs.kde.org/show_bug.cgi?id=395861
Comment 8 Dmitry Kazakov 2020-04-29 15:04:46 UTC
Git commit c416124848d52a9b82ef275e24e3aaa1f45a3004 by Dmitry Kazakov.
Committed on 29/04/2020 at 15:04.
Pushed by dkazakov into branch 'master'.

Remove 500ms delay between selection creation and cretion of marching ants

This delay was originally introduced to not interfere with painting,
which (in 2013) was done directly over the ants. Now we have overlay
mask functionality, therefore this delay is not needed anymore.

There is still a short visible delay. It is cause but the outline
genration algorithm is really slow. Perhaps we should also try to
fix speed when working on bug 419240.
Related: bug 395861

M  +1    -1    libs/ui/kis_selection_decoration.cc

https://invent.kde.org/kde/krita/commit/c416124848d52a9b82ef275e24e3aaa1f45a3004
Comment 9 Dmitry Kazakov 2020-04-29 15:07:59 UTC
Git commit ca1399e9bb2886b1ad1378ddcc719dc65957d722 by Dmitry Kazakov.
Committed on 29/04/2020 at 15:07.
Pushed by dkazakov into branch 'krita/4.3'.

Remove 500ms delay between selection creation and cretion of marching ants

This delay was originally introduced to not interfere with painting,
which (in 2013) was done directly over the ants. Now we have overlay
mask functionality, therefore this delay is not needed anymore.

There is still a short visible delay. It is cause but the outline
genration algorithm is really slow. Perhaps we should also try to
fix speed when working on bug 419240.
Related: bug 395861

M  +1    -1    libs/ui/kis_selection_decoration.cc

https://invent.kde.org/kde/krita/commit/ca1399e9bb2886b1ad1378ddcc719dc65957d722
Comment 10 Halla Rempt 2020-05-06 09:14:52 UTC
*** Bug 414310 has been marked as a duplicate of this bug. ***