Assistant: Don't index the /proc and /sys directories

Roughly 20% of indexing time in a fresh install was spent on traversing
these kernel-generated directories. Let's just not. :^)
This commit is contained in:
Andreas Kling 2021-07-03 22:11:44 +02:00
parent 94def5ae9d
commit c06f72c264
Notes: sideshowbarker 2024-07-18 10:32:56 +09:00

View file

@ -170,6 +170,10 @@ void FileProvider::build_filesystem_cache()
timer.start();
while (!m_work_queue.is_empty()) {
auto base_directory = m_work_queue.dequeue();
if (base_directory.template is_one_of("/proc"sv, "/sys"sv))
continue;
Core::DirIterator di(base_directory, Core::DirIterator::SkipDots);
while (di.has_next()) {