Files
ProxmoxVE/misc
MickLesk 6c05f7f858 perf(tools.func, alpine-tools.func): replace direct /etc/os-release reads with get_os_info(), echo|tr with bash builtins, consolidate pipelines
- get_os_info(): single while-read replaces 4 awk subprocesses on first call
- manage_tool_repository(): 7 awk|tr pipelines → get_os_info() cached lookups
- setup_hwaccel(): 3 grep|tr pipelines → get_os_info()
- setup_java/mysql/php/postgresql/clickhouse(): 2 awk|tr pipelines each → get_os_info()
- 6× echo|tr -d ' ' → bash parameter expansion (${var// /})
- 3× mod=$(echo|tr) → bash ${mod//[[:space:]]/}
- npm/apt-cache/cargo pipelines: grep|awk|tr → single awk with gsub
- COMBINED_MODULES: echo|tr|awk|paste (4 proc) → single awk with RS
- download_with_progress: awk|tr → awk gsub (both tools.func and alpine-tools.func)

Eliminates ~30 subprocess forks across typical tool setup paths.
2026-03-23 20:57:08 +01:00
..