Bug 405698

Summary: Vector graphic - lagging
Product: [Applications] krita Reporter: Sepq <sephiroth15>
Component: Layers/VectorAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED FIXED    
Severity: major CC: halla, marcostux
Priority: NOR Keywords: regression
Version: 4.1.7   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Vector manipulation
version 4.15

Description Sepq 2019-03-20 18:25:56 UTC
Created attachment 118945 [details]
Vector manipulation

SUMMARY


STEPS TO REPRODUCE
1. Create any file
2. Add vector layer 
3. Draw some shapes and manipulate with them

OBSERVED RESULT
Software is lagging when you manipulate shape: move, change size etc. 

EXPECTED RESULT
You can see how it is working on version 4.15 (I checked it and it is working fine) at 2:20. Drawing is smooth and instant. 
https://www.youtube.com/watch?v=KOFzmrJAkQ0 

SOFTWARE/OS VERSIONS
Windows: Windows 10
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
I was using in both version 4.15 and 4.17 the same default settings.
In version 4.20 vectors are lagging too.
Comment 1 Sepq 2019-03-20 18:26:35 UTC
Created attachment 118946 [details]
version 4.15
Comment 2 Halla Rempt 2019-03-21 15:16:05 UTC
This probably the culprit: 

commit dc4e44f448ba5fc8379ac7751baf2638593b0ac0
Author: Emmet O'Neill <emmetoneill.pdx@gmail.com>
Date:   Sun Oct 14 22:35:40 2018 +0200

    Improved responsiveness of moving large SVG objects.
    
    Added a KisSignalCompressor to the KisShapeLayerCanvas to reduce the
    number of updates.
    
    BUG:399363
Comment 3 Halla Rempt 2019-03-21 15:20:00 UTC
*** Bug 403340 has been marked as a duplicate of this bug. ***
Comment 4 Halla Rempt 2019-03-21 15:53:10 UTC
Git commit 861995e810b1ecfa5260903fd58ef89f199d3bc3 by Boudewijn Rempt.
Committed on 21/03/2019 at 15:53.
Pushed by rempt into branch 'master'.

Shape layers: change the canvas compressor delay depending on image size

This sort of keeps the best of both the fix for
https://bugs.kde.org/show_bug.cgi?id=399363 and some responsiveness
for smaller images.

The real solution probably would be to render the vector shapes at
the current zoom level, LoD-like (and only for the visible part,
of course), but that's way out of scope for now. We might as well
wish we could write our svg renderer without QPainter and with
proper color management.
Related: bug 399363

M  +15   -2    libs/ui/flake/kis_shape_layer_canvas.cpp
M  +2    -2    libs/ui/flake/kis_shape_layer_canvas.h

https://commits.kde.org/krita/861995e810b1ecfa5260903fd58ef89f199d3bc3
Comment 5 Dmitry Kazakov 2019-03-23 21:35:57 UTC
Git commit b4b8166ae74b7690c269b02f02d93ef5c9aeae02 by Dmitry Kazakov.
Committed on 23/03/2019 at 21:35.
Pushed by dkazakov into branch 'master'.

Adjust signal compressor in shape layer when image size changes
Related: bug 403340

M  +17   -17   libs/ui/flake/kis_shape_layer_canvas.cpp
M  +4    -1    libs/ui/flake/kis_shape_layer_canvas.h

https://commits.kde.org/krita/b4b8166ae74b7690c269b02f02d93ef5c9aeae02