I just downloaded Krita 5.0.2 AppImage (Ubuntu) after previously using Krita 4.x. I noticed that it is very slow to start every time, staying on the splash screen for 39 seconds. Krita 4.x loads in about 10 seconds.
Most of that time is spent reading from the Krita_*_Default_Resources.bundle files. Is that data supposed to be cached in resourcecache.sqlite? Currently I have to wait the 40 seconds every time I start Krita.
Yes…it is slower it seems…and I think somehow I started or partially started or something double instances on my Win 11 machine and caused a crazy issue with stylus/cursor lagging/freezing/…
The problem is more, if Krita rebuild the resource cache at each startup, there’s might be a problem somewhere.
Also, not sure the resource cache is not corrupted or not, and if you start to customize your resources (tags, …) you might loose everything at startup
@ericjpaint When starting Krita from command line, you should have some information in console
Example on my side, if I delete resource cache file, at startup I have this:
krita.lib.resources: Created table "version_information"
krita.lib.resources: Created table "storage_types"
krita.lib.resources: Created table "resource_types"
krita.lib.resources: Created table "storages"
krita.lib.resources: Created table "tags"
krita.lib.resources: Created table "resources"
krita.lib.resources: Created table "versioned_resources"
krita.lib.resources: Created table "resource_tags"
krita.lib.resources: Created table "metadata"
krita.lib.resources: Created table "tags_storages"
krita.lib.resources: Created table "tag_translations"
krita.lib.resources: Created table "storages"
krita.lib.resources: Created table "versioned_resources"
krita.lib.resources: Filled lookup table storage_types
krita.lib.resources: Filled lookup table resource_types
krita.lib.resources: Filled version table
Do you have it in console at each startup?
Or additional (error) messages?
If you delete the resource cache file, the problem persist on each startup?
Normally, once resources file is built, startup is fast.
On my side, with a 200MB resource file with hundred of brushes startup take a couple of seconds.
So there’s might be a problem somewhere…
Do you have this at each startup (when it takes times )?
@ericjpaint@EyeOdin@kacart could you please share the content of Help → Show Krita log for bug reports? It will be long so preferably on something like pastebin.com, it will show your paths (including username on your system) so if you want to make it more private, make sure to make it unlisted and to self-destruct in two weeks or so. Or change them with Find and Replace if you know how.
What I will be looking for is statement Database is up to date. It will show up only if the database is not being created from scratch. So absence of this text (in the first few lines of the log for every day) will mean that Krita does try to create it from scratch every time. (I hope I’ll remember to add another log line for the “creating database from scratch” event…)
For everyone with this issue, please also give me this information:
do you have plenty of resourcecache.sqlite.n~ (where n is a number) and if yes, how many (roughly)?
look at the creation date of resourcecache.sqlite, then close Krita and open again, and look at the creation date again, is it different (and set to just a moment ago)?
if you create your own custom tag, close Krita and reopen, does it still exist?
system, and the path to the resources (is it default or not) and if you’re on Windows, then if you use Windows Store package or some other (Steam or Epic Store or just from the website)
how many resources and tags do you have? I mean besides the default ones.
If you know how, it would be awesome if you could backup your resource folder and start Krita a few times with a newly created one, and see if it’s faster.
If it’s not the database recreating but just the database queries taking so long, we have a shimmer of hope in a form of this MR: Draft: Improve performance of query in KisTagResourceModel (!1302) · Merge requests · Graphics / Krita · GitLab - it makes quite an important query (which takes longer if you have plenty of resources and plenty of tags) even up to 4x faster. And I’m working on other performance improvements, too. But we gotta first check what is really going on here
I’m not concerned about 20 sec startup, but will take a look at that log and see what it says…
…
here’s my most recent startup:
SESSION: 28 Jan 2022 06:32:50 -0700. Executing C:\Program Files\Krita (x64)\bin\krita.exe
Krita Version: 5.0.2, Qt version compiled: 5.12.12, loaded: 5.12.12. Process ID: 17772
28 Jan 2022 06:32:50 -0700: Style: fusion. Available styles: windowsvista, Windows, Fusion
28 Jan 2022 06:32:56 -0700: Database is up to date. Version: 0.0.15, created by Krita 5.0.0, at Thu Dec 23 13:57:38 2021
28 Jan 2022 06:33:01 -0700: Could not retrieve md5 for resourcepalettes/Pastel5x2.kpl
28 Jan 2022 06:33:02 -0700: Non-store package - creating updater
28 Jan 2022 06:33:15 -0700: CLOSING SESSION
SESSION: 28 Jan 2022 09:21:14 -0700. Executing C:\Program Files\Krita (x64)\bin\krita.exe
Krita Version: 5.0.2, Qt version compiled: 5.12.12, loaded: 5.12.12. Process ID: 15028
28 Jan 2022 09:21:14 -0700: Style: fusion. Available styles: windowsvista, Windows, Fusion
28 Jan 2022 09:21:17 -0700: Database is up to date. Version: 0.0.15, created by Krita 5.0.0, at Thu Dec 23 13:57:38 2021
28 Jan 2022 09:21:22 -0700: Could not retrieve md5 for resourcepalettes/Pastel5x2.kpl
28 Jan 2022 09:21:23 -0700: Non-store package - creating updater
I previously was using Ubuntu’s Krita 4.4.2, and then downloaded the 5.0.2 AppImage (x86-64) from krita.org. They seem to use different directories because none of my old brushes show up.
It says “Database is up to date.” 1 second after starting, then spends 30+ seconds reading bundle files.
In stderr I also see a pile of “NOT COOL: Duplicate action name from xml data:” messages early in the startup.
Edit: I should point out that the logs show that the database was created several days ago. So it seems the database is not being re-created every time, but still spends a lot of time reading bundle files.