Implement removing metadata from resource cache db.
People have reported that suddenly the whole resource system is slow when they're using a dev build of Krita, ever since the fonts have been added as resources.
Turns out we never removed metadata from the database, and given fonts use metadata extensively, this caused obvious problems.
This removes said metadata from the DB, both when removing a resource/storage but also orphaned metadata when synchronising the db.
Test Plan
- Have slow loading in resource selectors, like search and tagging for resources.
- Backup resource cache in resource folder
- Start this version of Krita.
- Check if resources are still slow.
Formalities Checklist
-
I confirmed this builds. -
I confirmed Krita ran and the relevant functions work. -
I tested the relevant unit tests and can confirm they are not broken. (If not possible, don't hesitate to ask for help!) -
I made sure my commits build individually and have good descriptions as per KDE guidelines. -
I made sure my code conforms to the standards set in the HACKING file. -
I can confirm the code is licensed and attributed appropriately, and that unattributed code is mine, as per KDE Licensing Policy. -
Does the patch add a user-visible feature? If yes, is there a documentation MR ready for it at Krita Documentation Repository?