diff --git a/scripts/source/loading/initilize_files.sh b/scripts/source/loading/initilize_files.sh index 2b80528..a5db116 100755 --- a/scripts/source/loading/initilize_files.sh +++ b/scripts/source/loading/initilize_files.sh @@ -16,8 +16,14 @@ sourceInitilize() # Check if the directory exists if [ -d "$file_list_directory" ]; then - # Use find to get a list of all files (excluding directories) in the directory and its subdirectories - local file_list=$(find "$file_list_directory" -type f -name "*.sh") + # Use find to get a list of all files (excluding directories) in the + # directory and its subdirectories. The function_manifest.sh file is + # excluded — it carries ~860 stub function definitions (~50 ms parse + # cost) that are only needed in lazy mode, where it's sourced + # explicitly. Including it here makes every eager-mode invocation pay + # for lazy infrastructure it never uses. + local file_list=$(find "$file_list_directory" -type f -name "*.sh" \ + ! -name "function_manifest.sh") # Loop through each file in the file list while IFS= read -r file; do