Bug 393503

Summary: First stroke in a row has a strong lag.
Product: [Applications] krita Reporter: SirPigeonz <GBirdboy>
Component: Brush enginesAssignee: Dmitry Kazakov <dimula73>
Status: RESOLVED UPSTREAM    
Severity: normal CC: antti.savo, halla, scottpetrovic
Priority: NOR    
Version First Reported In: 4.0.1   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description SirPigeonz 2018-04-25 13:07:02 UTC
When you make few fast strokes in succession first one is rendered with quite big delay.
Next strokes fallowing it are rendered normally, but if you wait around 3-5 seconds and make test again first stroke after pause lags again.

Instant preview mode doesn't help.

For now tested only on Windows with Wacom Intuos Pro. Will try on Linux machine soon.
Comment 1 Scott Petrovic 2018-04-25 13:16:21 UTC
Do a bit more testing and also provide your system specs. I am not experiencing any lag on my first stroke on my Windows 10 box. I am on a Huion tablet right now.  

Does it matter if it is with bigger or smaller brush sizes. Does it is also matter if you are zoomed to 100%?
Comment 2 SirPigeonz 2018-04-25 13:30:25 UTC
Oh.
Tested on Photoshop and Gimp no problem there, so it's not hardware problem.
Comment 3 SirPigeonz 2018-04-25 13:37:41 UTC
Lags on even really tiny brushes, same on big ones.

Tested with:
- Quick Brush
- Pixel Brush
- Smudge Brush
- Sketch Brush

Specs: Intel Core i7-2600 3.4 GHz, 16GB RAM, nVidia GTX 750
Comment 4 SirPigeonz 2018-04-25 13:56:08 UTC
Sorry for too many comments xD

I've tested with different zoom levels. Nothing changes between 17-100-400 %.
Comment 5 Scott Petrovic 2018-04-25 13:59:24 UTC
Can you explain how you are testing?

What brushes are you using...and how long are you waiting between strokes to get the "first" stroke?
Comment 6 SirPigeonz 2018-04-25 16:01:17 UTC
Image A4 300dpi, b)_Basic-1 40px, waiting around 2 seconds.

First stroke looks like tiles are refreshing slower than they should, if you make next stroke right after "first" they don't have visible tile refresh lag.

Tested also with normal mouse same problem so it's not input dependent. :)
Comment 7 Scott Petrovic 2018-04-25 16:44:26 UTC
Thanks for the info. Someone else is going to have to test this. I can't seem to get this lag on my machine (which is quite a bit less powerful than yours).
Comment 8 SirPigeonz 2018-04-26 08:16:16 UTC
Ok. I understand although I have new info I guess xD

I've tried to change Krita setting trying to find something.
I tweaked "Performance" settings in "Advanced" tab I turned on performance stats and turned OFF "Progress reporting".
And my lags disappeared xD

I've tried turning "Progress reporting" ON to check if it was a culprit but turning it ON or restarting Krita didn't made lags come back.

Technically my problem is fixed for now... I will try to monitor situation and report any new info.
Comment 9 Scott Petrovic 2018-04-26 14:30:40 UTC
Ahh interesting. That Progress Reporting does say it might affect performance as well. I am not quite sure what it is doing to know why it would affect your computer and not mine though.

Someone like Dmitry might have to look at it and give some feedback. Maybe we need to have that setting off by default or intelligently turn it off in some situation.
Comment 10 Halla Rempt 2018-04-27 09:15:09 UTC
Okay, let's assign to Dmitry then. But if it turned out to be irreproducible after toggling the switch it might be hard to dig in further.
Comment 11 Antti Savolainen 2018-08-25 11:31:35 UTC
Alright, I think I've found the solution on reddit: The lag occurs because the wacom drivers have a "Tip Double Click Distance" setting. Put the slider to off and this issue should no longer exist.

https://www.reddit.com/r/krita/comments/7cmktc/lag_at_beginning_of_stroke_wacom_windows_10/ First comment.
Comment 12 Halla Rempt 2018-09-17 12:04:30 UTC
Closing, this isn't something we can do anything about.