Step 1. Before you submit
Step 2. Quick diagnose info
Quick diagnose
N/A — code-level performance finding from static analysis (no live-session repro).
Step 3. Describe the issue
sdata/dist-arch/install-deps.sh:29-34 — implicitize_old_dependencies() runs a nested O(explicit × old-deps) loop and spawns a separate yay -D --asdeps "$i" subprocess per match:
for i in "${explicitly_installed[@]}"; do for j in "${old_deps_list[@]}"; do
[ "$i" = "$j" ] && yay -D --asdeps "$i"
done; done
Each yay invocation costs ~1 s of startup. With ~10-20 matches per install, this adds ~10-20 s to every setup install run, on top of the O(n²) comparisons.
Suggested fix
Collect matches in an array, then issue a single batched call:
matches=()
for i in "${explicitly_installed[@]}"; do for j in "${old_deps_list[@]}"; do
[ "$i" = "$j" ] && matches+=("$i")
done; done
(( ${#matches[@]} )) && yay -D --asdeps "${matches[@]}"
Reminder
Step 1. Before you submit
Step 2. Quick diagnose info
Quick diagnose
Step 3. Describe the issue
sdata/dist-arch/install-deps.sh:29-34—implicitize_old_dependencies()runs a nested O(explicit × old-deps) loop and spawns a separateyay -D --asdeps "$i"subprocess per match:Each
yayinvocation costs ~1 s of startup. With ~10-20 matches per install, this adds ~10-20 s to everysetup installrun, on top of the O(n²) comparisons.Suggested fix
Collect matches in an array, then issue a single batched call:
Reminder