revisiting the sycoca

Harald Sitter sitter at kde.org
Thu Feb 8 14:22:05 GMT 2024


It occurs to me that we should ponder sycoca a bit.

Currently the sycoca contains 3 types of caches:

- the mime cache: should in fact be unnecessary because there is
already a mime.cache in /usr/share/mime?

- the menu structure cache: for the most part only loaded once by
plasmashell so the caching seems a bit questionable (caveat: kopenwith
also uses the menu structure)

- the applications desktop file cache: with most metadata having moved
to json, the desktop file caching sycoca offers seems not particularly
useful any longer as it is basically just caching
/usr/share/applications and variants thereof. In practice we have very
few apps that actually start other apps (notably plasmashell) so they
could just always hold the desktop files in memory and refresh on
inotifies. There is also a new-ish mimeinfo.cache which we can hold on
to.

All in all I am not convinced we still need the sycoca. Indeed one
huge question is why we are holding on to a bespoke cache. If files
need caching then shouldn't we cache them on an xdg level? There is of
course also the point that nobody else seems to need them cached,
calling the sycoca yet more into question.

With all that in mind... how about we deprecated the sycoca? It'd
shave some 5k lines off of kservice in the long run.

HS


More information about the kde-core-devel mailing list