Summary: | Closing documents takes significantly longer than before | ||
---|---|---|---|
Product: | [Applications] krita | Reporter: | tomtomtomreportingin |
Component: | General | Assignee: | Dmitry Kazakov <dimula73> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | dimula73, griffinvalley |
Priority: | NOR | Keywords: | regression |
Version: | nightly build (please specify the git hash!) | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
tomtomtomreportingin
2021-12-20 17:14:48 UTC
Since such lag was not perceivable in beta 2, this is a regression. I can only reproduce when there's been two or more images opened in a given session, a single image behaves normally. Opening times is equal between both krita-5.0.0-beta2-5771a7d-x86_64.appimage and krita-5.0.0-x86_64.appimage . This leads me to believe that the problem lies in image handling. There's been several bug fixes there, between https://invent.kde.org/graphics/krita/-/commit/451e1415fd1b3a0f9c24de2fd4707d1b1e164236 and https://invent.kde.org/graphics/krita/-/commit/a9fc8fa7b270871996924e19ba7456cccab452b5 As most of these commits fix crashes, I do not think we should revert these, and I do not consider this a release blocker. Yeah, the problem happens because the destructor of the document tries to deregister the temporary storages, this deregistration takes 900ms with the default set of bundles. A possibly relevant merge request was started @ https://invent.kde.org/graphics/krita/-/merge_requests/1253 Git commit b086633b58c0279ffe2da97e00dc779f04a24905 by Dmitry Kazakov. Committed on 05/01/2022 at 08:34. Pushed by dkazakov into branch 'master'. Fix delay when opening and closing a document Basically, we shouldn't reset all the models when we add/remove a storage, we have all the information necessary for a graceful update. Document creation/closing time drops from 900ms to 300ms. Limitations of the patch: * it fixes only the case when the user has no tag selected Still TODO: * implement the same updates for KisAllTagResourceModel * implement proper updates for the case when we disable/enable a source, right now it causes full reset as well M +34 -0 libs/resources/KisResourceCacheDb.cpp M +1 -0 libs/resources/KisResourceCacheDb.h M +46 -5 libs/resources/KisResourceLocator.cpp M +3 -3 libs/resources/KisResourceLocator.h M +16 -14 libs/resources/KisResourceModel.cpp M +4 -4 libs/resources/KisResourceModel.h M +1 -1 libs/resources/KisTagResourceModel.cpp https://invent.kde.org/graphics/krita/commit/b086633b58c0279ffe2da97e00dc779f04a24905 Git commit a211005a8714429c14b7627a2803ce25daec52fa by Dmitry Kazakov. Committed on 05/01/2022 at 08:35. Pushed by dkazakov into branch 'krita/5.0'. Fix delay when opening and closing a document Basically, we shouldn't reset all the models when we add/remove a storage, we have all the information necessary for a graceful update. Document creation/closing time drops from 900ms to 300ms. Limitations of the patch: * it fixes only the case when the user has no tag selected Still TODO: * implement the same updates for KisAllTagResourceModel * implement proper updates for the case when we disable/enable a source, right now it causes full reset as well (cherry picked from commit b086633b58c0279ffe2da97e00dc779f04a24905) M +34 -0 libs/resources/KisResourceCacheDb.cpp M +1 -0 libs/resources/KisResourceCacheDb.h M +46 -5 libs/resources/KisResourceLocator.cpp M +3 -3 libs/resources/KisResourceLocator.h M +16 -14 libs/resources/KisResourceModel.cpp M +4 -4 libs/resources/KisResourceModel.h M +1 -1 libs/resources/KisTagResourceModel.cpp https://invent.kde.org/graphics/krita/commit/a211005a8714429c14b7627a2803ce25daec52fa Git commit 263cd91b3e28b75b702b3aaa28f91a69ec217ba4 by Dmitry Kazakov. Committed on 05/01/2022 at 08:38. Pushed by dkazakov into branch 'krita/5.0.0'. Fix delay when opening and closing a document Basically, we shouldn't reset all the models when we add/remove a storage, we have all the information necessary for a graceful update. Document creation/closing time drops from 900ms to 300ms. Limitations of the patch: * it fixes only the case when the user has no tag selected Still TODO: * implement the same updates for KisAllTagResourceModel * implement proper updates for the case when we disable/enable a source, right now it causes full reset as well (cherry picked from commit b086633b58c0279ffe2da97e00dc779f04a24905) M +34 -0 libs/resources/KisResourceCacheDb.cpp M +1 -0 libs/resources/KisResourceCacheDb.h M +46 -5 libs/resources/KisResourceLocator.cpp M +3 -3 libs/resources/KisResourceLocator.h M +16 -14 libs/resources/KisResourceModel.cpp M +4 -4 libs/resources/KisResourceModel.h M +1 -1 libs/resources/KisTagResourceModel.cpp https://invent.kde.org/graphics/krita/commit/263cd91b3e28b75b702b3aaa28f91a69ec217ba4 I think this bug can now be closed as resolved, since the document is now closed in a fraction of a blink. There is still a small delay (about 300ms) on deactivation/activation of bundles, but that is a different bug. |