From ccb4518e2cb6d9be1f6cdca5cbc32870bfd744bc Mon Sep 17 00:00:00 2001 From: Eric Torres Date: Tue, 13 Sep 2022 21:37:33 -0700 Subject: [PATCH] Add option to force fd to use all available threads when running --- file_scripts/search.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/file_scripts/search.py b/file_scripts/search.py index 4068c75..77e0ca6 100644 --- a/file_scripts/search.py +++ b/file_scripts/search.py @@ -7,6 +7,7 @@ import shutil import subprocess +from multiprocessing import cpu_count from sys import platform # ========== Constants ========== @@ -21,6 +22,8 @@ DEFAULT_FIND_OPTS = [ "f", "--type", "l", + "--threads", + str(cpu_count()), ] EXTRA_FIND_OPTS = {"no_ignore": "--no-ignore", "no_ignore_vcs": "--no-ignore-vcs"}