Today I'll be comparing two plugin managers for GNU BASH:
Fresh installation of Void Linux, GLibC edition
- QEMU
- 2048 MB of RAM
- 2 CPU cores
- Host CPU: Intel i3 8th generation
- 32 MB of VRAM
- 30 GB QCOW2 storage
- 500 MB Boot (vfat)
- 2 GB Swap (swap)
- 27.5 GB Root (ext4)
- BASH version:
5.1.16
I just run this command:
for _ in $(seq 1000); do { /usr/bin/time -f '%e' bash -ic exit 2>&1 | tail -n 1; }; done >out.dat
This collects run time for 1000 runs
I have been able to collect 4 files:
baz-agnoster.dat
baz-startup.dat
omb-agnoster.dat
omb-startup.dat
And you can probably tell what is what lol *-agnoster
is 'loaded with agnoster plugin' (one of the more beefy bash themes) and 'startup' is vanilla loading time, no plugins, nothing
Parsing data
Parsed all data
Statistics for 'baz'
agnoster:
Average: 0.021 s
Median: 0.020 s
Sum: 20.960 s / 1000 runs
Graph: 'graphs/baz-agnoster-graph.png'
startup:
Average: 0.011 s
Median: 0.010 s
Sum: 11.330 s / 1000 runs
Graph: 'graphs/baz-startup-graph.png'
Statistics for 'omb'
agnoster:
Average: 0.083 s
Median: 0.070 s
Sum: 83.190 s / 1000 runs
Graph: 'graphs/omb-agnoster-graph.png'
startup:
Average: 0.118 s
Median: 0.110 s
Sum: 118.300 s / 1000 runs
Graph: 'graphs/omb-startup-graph.png'
In context of 'agnoster' average baz load time is 0.06 s faster than omb, 0.05 s per median, in batches this makes a 62.23 s difference
In context of 'startup' average baz load time is 0.11 s faster than omb, 0.10 s per median, in batches this makes a 106.97 s difference
I just made a very shitty python script as I won't publish it rlly, but if you want it see #links, graphs are there too
I feel like oh-my-bash is much slower to even start up as vanilla for usage, it feels slow, it is slow ! Plus it's less flexible than baz
with plugin, creation so at least for me personally, baz
is a muuuccchh better option plus I don't have to wait a lot of time for my plugins to load, for example on my host it only takes 60-80 ms to load 14 plugins I have installed
#Which is the better option
I'd say baz
, this is why:
- Faster
- Easier to make plugins for
- Simpler
- More flexible for developers
- More modular, meaning no need to do weird
git
stuff and overwrite your bashrc - Actively developed and optimised
- GPL Licensing if you care