1
0
Fork 0
mirror of synced 2024-11-24 00:05:35 -05:00
12 Speed
Eric Nielsen edited this page 2021-11-26 09:54:53 -05:00

Speed is important and is something Zim takes pride in. Many users of Zsh frameworks complain of the slowness in gaining an interactive session. Below is a load-time comparison of many popular frameworks.

The tests were done with almost the exact same modules/plugins. The default configurations for each framework are changed only slightly from their default. This is to match feature-parity against the baseline, Zim. Each load-time test was run 100 times to get the best possible results. The tests were run with the expect script below, that measures the time until the first prompt appearance.

#!/usr/bin/expect -f

set wd [file tail [pwd]]
set c0 [clock microseconds]
spawn -noecho zsh -li
expect {
  -re {\e](?:[0127]|1337);.*?(?:\a|\e\\)} { exp_continue } ; # match escape sequences to be ignored
  $wd { send_error "[expr [clock microseconds] - $c0]\n" } ; # match working dir at prompt
  timeout { exit 1 }
}
sleep 1
send "exit\r"

The script that generated these results can be found here.

Zsh frameworks benchmark