Bug 456668 - Ratio with a weird curve creates lag in the first stroke. Video included
Summary: Ratio with a weird curve creates lag in the first stroke. Video included
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: * Unknown (show other bugs)
Version: 5.0.6
Platform: Other Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Dmitry Kazakov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-07-13 09:12 UTC by RamonMiranda
Modified: 2022-08-02 11:30 UTC (History)
2 users (show)

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


Attachments
The curve that creates the lag (51.77 KB, image/jpeg)
2022-07-13 09:12 UTC, RamonMiranda
Details

Note You need to log in before you can comment on or make changes to this bug.
Description RamonMiranda 2022-07-13 09:12:53 UTC
Created attachment 150580 [details]
The curve that creates the lag

SUMMARY
Ratio at point in value 0 in the curve for ratio makes the brush to have a serious lag in win 10.
Attached image for the curve that causes this.

STEPS TO REPRODUCE
1.Select Basic 2 opacity brush
2. Reproduce the curve i attach as an image
3. See the lag while you try to move the point you hace created

OBSERVED RESULT
Big lag in the first stroke.

EXPECTED RESULT
No lag.

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

ADDITIONAL INFORMATION
I know is easy to solve modifying the brush but that makes me recreate the entire bundle i show in the video (for Gesture drawing video. The Next one). Is not happening in Kubuntu where i created the bundle to be as much usable and good for Krita 4 and Krita 5 and also for not tilt users and left handed and right handled people. I report it not for ranting, but help because maybe is related with other things or people testing  are going to find it and rat about Krita.. 

The video if you want to see the bug in real time 
https://drive.google.com/file/d/1jFjBeJHMV8wKYd4QBsXAcAsrFWCfeZMR/view?usp=sharing
Also happens in Krita 4 and Krita 5

Thanks for the hard job.
Comment 1 Dmitry Kazakov 2022-08-02 11:00:50 UTC
Hi, Ramon!

I've found the reson of the slowdown :) When the ratio is null, then the brush has a zero height, so Krita spits a warning into the terminal/debug-app, which makes it so slow :)

The question is, what is the expected behavior of the brush, when ratio is null? Should it be just empty or have at least one pixel in height?
Comment 2 Dmitry Kazakov 2022-08-02 11:29:37 UTC
Git commit f4e04fb827c03857853dab9e778cd29cd062d7a9 by Dmitry Kazakov.
Committed on 02/08/2022 at 11:29.
Pushed by dkazakov into branch 'master'.

Fix a slowdown when attaching dynamic sensor to Ratio option

M  +3    -1    libs/brush/kis_qimage_pyramid.cpp

https://invent.kde.org/graphics/krita/commit/f4e04fb827c03857853dab9e778cd29cd062d7a9
Comment 3 Dmitry Kazakov 2022-08-02 11:29:46 UTC
Git commit 43c7b62ae982f0ec6e20208d6ea0367d9ddaff70 by Dmitry Kazakov.
Committed on 02/08/2022 at 11:29.
Pushed by dkazakov into branch 'krita/5.1'.

Fix a slowdown when attaching dynamic sensor to Ratio option

M  +3    -1    libs/brush/kis_qimage_pyramid.cpp

https://invent.kde.org/graphics/krita/commit/43c7b62ae982f0ec6e20208d6ea0367d9ddaff70
Comment 4 Dmitry Kazakov 2022-08-02 11:30:37 UTC
Hi, Ramon!

There seems to be no use in trying to limit effect of the ratio sensor to 1px, so I just removed the warning :)