Bug 390897 - Bigger brush patters slow down stroke preview
Summary: Bigger brush patters slow down stroke preview
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Usability (show other bugs)
Version: 4.0.0-beta.1
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-02-22 10:34 UTC by Rytelier
Modified: 2018-03-04 14:28 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rytelier 2018-02-22 10:34:02 UTC
Using 4.0 Beta 2 (from  the news).

When I apply a texture to the stroke, it slows down the stroke preview causing adjusting brush settings to be laggy. Slowdowns start from 1024px pattern and it becomes slower when brush's pattern resolution is bigger.

Steps to reproduce:
- Create or import a pattern bigger than 1024px
- Apply this as a brush stroke texture
- Adjust carious brush settings to see the slowdown
Comment 1 Halla Rempt 2018-02-22 10:45:19 UTC
Sorry, but what do you expect? The bigger a texture, the more calculations need to happen, so the more time that takes. If you're using really big textures, you'll have to be a bit more patient: this will also affect the brush speed, of course.

And while we're always trying to make Krita faster by optimizing algorithms, it will always be true that if you're trying to manipulate more pixels at a time, then that will take more CPU and so more time: you cannot have instant infinity.
Comment 2 wolthera 2018-02-23 02:56:34 UTC
Git commit 6bba5e0779d2d7639237359957793173b0f75a01 by Wolthera van Hövell tot Westerflier.
Committed on 23/02/2018 at 02:56.
Pushed by woltherav into branch 'master'.

Live Brush Preview: Limit more paintop settings to reasonable sizes.

When having massive texture sizes, or massive brushes on the spraybrush,
the gui will freeze updue to live preview having trouble with all this.

This may seem like a case where the user shoots themselves in the foot
by picking too big sizes, but when using it, it isn't obvious that the
paintop preview is causing the GUI freeze, and it is more common to cause
these freezes by fatfingering controls than it is to cause freezes while
painting with a slow brush. Therefore let's limit these values to reasonable
sizes.

M  +49   -2    libs/ui/widgets/kis_preset_live_preview_view.cpp

https://commits.kde.org/krita/6bba5e0779d2d7639237359957793173b0f75a01
Comment 3 Rytelier 2018-03-04 14:28:44 UTC
I've checked latest nightly build after the fix and the issue is still here.
From what I've read in code changes, it lowers and freezes pattern's scale in temporary brush for preview (correct me if I'm wrong).
But scale property doesn't affect the preview speed at all, it's all depended on the pattern's resolution itself.

I don't know how programically would be it doable, but maybe limit preview's stroke texture's size by automatically cropping it? If it's not possible, then I suggest for option for user to disable the preview.