1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 09:28:13 +00:00

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

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()) {