[FileIndexerConfig] Delay populating folders until actually used
ClosedPublic

Authored by broulik on Mar 13 2018, 10:17 AM.

Details

Summary

The folder inclusion/exclusion configuration queries Solid for external media to exclude them, this adds a significant overhead to using FileIndexerConfig.
In most places it is merely used to check whether file indexing is enabled in general.

Test Plan

Creating DolphinViewActionHandler which checks Baloo availability on Dolphin startup showed up as 3% cost in the profiler. After this change it is less than 0.4%.

  • Verified that Baloo file places disappeared when disabling it
  • Verified that Dolphin search still enabled and disabled additional search criteria depending on the folder you're searching in and that it is using baloosearch or filenamesearch accordingly; also verified that the folder cache is populated when this happens

Dolphin does not gray out sort options and additional roles for Baloo roles when disabled but that is a bug unrelated to this change

Diff Detail

Repository
R293 Baloo
Lint
Lint Skipped
Unit
Unit Tests Skipped
broulik created this revision.Mar 13 2018, 10:17 AM
Restricted Application added projects: Frameworks, Baloo. · View Herald TranscriptMar 13 2018, 10:17 AM
Restricted Application added a subscriber: Frameworks. · View Herald Transcript
broulik requested review of this revision.Mar 13 2018, 10:17 AM
michaelh accepted this revision.Mar 13 2018, 12:08 PM

Ha! Wonderful, this touches a question I raised on kde-devel ML recently. Say we wanted to test this patch. We would need some kind of mock drive, right? I'd very much appreciate if you would lay out your thought on this.
Secondly this illustrates that my comprehension of ABI is still fragmentary. Obviously this is not breaking, but I thought it would.

Dolphin does not gray out sort options and additional roles for Baloo roles when disabled but that is a bug unrelated to this change

Didn't see that.

This revision is now accepted and ready to land.Mar 13 2018, 12:08 PM
This revision was automatically updated to reflect the committed changes.