summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-07-03 22:11:44 +0200
committerAndreas Kling <kling@serenityos.org>2021-07-03 22:14:09 +0200
commitc06f72c2644eb3e92f8fb654dd08c3909b9c0aae (patch)
treec46eeef0f63a11fb1a899ae57f1bb30e3856378b /Userland
parent94def5ae9d141ad01740a95fe674764beda08bd7 (diff)
downloadserenity-c06f72c2644eb3e92f8fb654dd08c3909b9c0aae.zip
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. :^)
Diffstat (limited to 'Userland')
-rw-r--r--Userland/Applications/Assistant/Providers.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/Userland/Applications/Assistant/Providers.cpp b/Userland/Applications/Assistant/Providers.cpp
index 7b62d219c8..072ec7917e 100644
--- a/Userland/Applications/Assistant/Providers.cpp
+++ b/Userland/Applications/Assistant/Providers.cpp
@@ -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()) {