Nicolas <niko...@gmail.com> writes: > Hello, > > I ran some benchmarks of Bash 4.0-rc1. It is quite impressive! Here are the > results. > My computer is a Pentium M (running at 600 MHz for the test), running Linux > 2.6.26 with libc6 version 2.7 and Debian bash-completion version 20080705. > The figures are averages over 100 tests. > > Bash 3.2, without bash malloc: > * eval `dircolors`: 0.636s > * source /etc/bash_completion: 0.721s > > Bash 4.0, with bash malloc: > * eval `dircolors`: 0.385s > * source /etc/bash_completion: 41.651s (around 93% of the time is spent in > function find_entry of lib/malloc/table.c) > > Bash 4.0, without bash malloc: > * eval `dircolors`: 0.132s > * source /etc/bash_completion: 0.703s
bash_completion is too slow because it does strange things: it parses itself because it wants to emulate the behavior of "-o plusdirs". See https://bugzilla.redhat.com/show_bug.cgi?id=479936 for a preliminary patch.