-
-
Notifications
You must be signed in to change notification settings - Fork 615
Description
Description
Fastfetch currently executes command modules sequentially, even when they are independent and non-blocking. This can introduce noticeable latency when multiple commands are defined in the config. For example:
These commands are unrelated, but their sequential execution can induce up to ~300ms of delay in the worst case. This overhead becomes more significant when using commands that involve I/O, network access, or external binaries.
Motivation
Allowing command modules to execute in parallel would reduce latency and improve responsiveness, especially in setups where multiple independent commands are used. This is particularly relevant for:
- Network-bound tools (
gh,curl,ping) - Disk I/O utilities (
du,fd,lsblk) - External binaries with startup cost (
flatpak,snap,nix)
An opt-in "parallel": true flag for command modules would give users control over execution strategy without breaking existing behavior.
Additional context
Suggested syntax:
{
"type": "command",
"key": "│ {#35} editor {#keys}│",
"text": "%EDITOR% --version",
"parallel": true
},
{
"type": "command",
"key": "│ {#35} visual {#keys}│",
"text": "echo %VISUAL%",
"parallel": true
}This feature would be:
- Backward-compatible (default remains sequential)
- Useful for benchmarking, async info gathering, and performance-sensitive setups
- Potentially extendable to other custom modules in the future
{ "type": "command", "key": "│ {#35} editor {#keys}│", "text": "%EDITOR% --version" // adds ~80ms }, { "type": "command", "key": "│ {#35} visual {#keys}│", "text": "echo %VISUAL%" // adds ~100ms }