Bug 419238 - [autosave] Brush stroke freeze during autosave process
Summary: [autosave] Brush stroke freeze during autosave process
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: File formats (show other bugs)
Version: 4.2.9-beta1
Platform: Appimage Linux
: NOR normal
Target Milestone: ---
Assignee: Dmitry Kazakov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-03-25 16:36 UTC by David REVOY
Modified: 2020-04-30 20:24 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
^ short video of the bug in action (36seconds, stroke start at 5s then freeze at 90% autosave process visible) (636.26 KB, video/mp4)
2020-03-25 16:36 UTC, David REVOY
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David REVOY 2020-03-25 16:36:13 UTC
Created attachment 127010 [details]
^ short video of the bug in action (36seconds, stroke start at 5s then freeze at 90% autosave process visible)

Hi,
I've been spoiled by the way autosave was totally invisible in background while painting on the previous versions. On this version, I noticed a freeze happening while painting. I couldn't find it during beta because my documents were more light weight and the postponing mecanism to autosave file managed to save in between my pause, while switching brushes or navigating canvas. With a larger document, doing smaller strokes to paint details and with  autosave set to 5min; this small freezing time becomes quickly a pain and a reason to turn off autosave.

To reproduce:
=============
1. Open a heavy multilayered Krita file ( or anything that takes long to save).
2. Switch autosave in settings to a minimal value (3min)
3. Paint, and when you see on the bottom of the GUI the autosave progress bar starts, paint a long stroke without releasing the stylus and keep scribbling.

Observed:
=========
The long stroke will froze while the progress bar increments. It gives the feeling of a locked freehand tool during a short second. (video in attachement).
Comment 1 Dmitry Kazakov 2020-04-30 20:24:03 UTC
Git commit f460064ef598bdf7f439ea8c273cea264275a0b1 by Dmitry Kazakov.
Committed on 30/04/2020 at 20:21.
Pushed by dkazakov into branch 'master'.

Don't load entire file to RAM when computing MD5 hash sum

M  +3    -2    libs/resources/KoMD5Generator.cpp

https://invent.kde.org/kde/krita/commit/f460064ef598bdf7f439ea8c273cea264275a0b1
Comment 2 Dmitry Kazakov 2020-04-30 20:24:03 UTC
Git commit eda07ac6a3191dc98381662bcbb23bd7f746f1fe by Dmitry Kazakov.
Committed on 30/04/2020 at 20:23.
Pushed by dkazakov into branch 'master'.

Don't generate MD5 hash for files bigger than 10MB

This hash is used only for logging, so there is no reason for spending
time on it.

We should probably consider total removing of this hash, since its
calculation for a 7MiB file takes about 10ms.

M  +1    -1    libs/ui/KisDocument.cpp

https://invent.kde.org/kde/krita/commit/eda07ac6a3191dc98381662bcbb23bd7f746f1fe
Comment 3 Dmitry Kazakov 2020-04-30 20:24:41 UTC
Git commit 40879777f07ef300d922943902b4878dc3fa974a by Dmitry Kazakov.
Committed on 30/04/2020 at 20:24.
Pushed by dkazakov into branch 'krita/4.3'.

Don't load entire file to RAM when computing MD5 hash sum

M  +3    -2    libs/pigment/resources/KoMD5Generator.cpp

https://invent.kde.org/kde/krita/commit/40879777f07ef300d922943902b4878dc3fa974a
Comment 4 Dmitry Kazakov 2020-04-30 20:24:41 UTC
Git commit 3a4bfe954406766ce16d57df57a81928c402210e by Dmitry Kazakov.
Committed on 30/04/2020 at 20:24.
Pushed by dkazakov into branch 'krita/4.3'.

Don't generate MD5 hash for files bigger than 10MB

This hash is used only for logging, so there is no reason for spending
time on it.

We should probably consider total removing of this hash, since its
calculation for a 7MiB file takes about 10ms.

M  +1    -1    libs/ui/KisDocument.cpp

https://invent.kde.org/kde/krita/commit/3a4bfe954406766ce16d57df57a81928c402210e