Skip to content

Backport !1734 “glocalfileinfo: Use a single timeout source at a time for hidden file cache” to glib-2-66

As hidden file caches currently work, every look up on a directory caches its .hidden file contents, and sets a 5s timeout to prune the directory from the cache.

This creates a problem for usecases like Tracker Miners, which is in the business of inspecting as many files as possible from as many directories as possible in the shortest time possible. One timeout is created for each directory, which possibly means gobbling thousands of entries in the hidden file cache. This adds as many GSources to the glib worker thread, with the involved CPU overhead in iterating those in its main context.

To fix this, use a unique timeout that will keep running until the cache is empty. This will keep the overhead constant with many files/folders being queried.


Trivial backport of !1734 (merged) to glib-2-66.

Merge request reports