[Pkg-sysvinit-devel] speed of /etc/init.d/umountfs
Ralf Dreibrodt
ralf at dreibrodt.de
Sat Jan 26 11:03:18 UTC 2008
Hello,
I am talking about /etc/init.d/umountfs:
# Print in order of decreasing length
#
# Algorithm: Find and print longest argument, then call self
# to print remaining arguments in order of decreasing length
#
# This function runs at one tenth the speed of the sort program
# but we use the function because we don't want to rely on any
# programs in /usr/.
#
# N.B.: Arguments must not be null and must not contain whitespace
#
pioodl() {
...
}
1/10 is wrong.
We have at a bigger server 2418 entries in /proc/mounts.
Sort needs 0,5 seconds. The above script needs about 1200 seconds.
So the speed is 1/2400, which is very slow. Perhaps you can optimize this.
Regards,
Ralf Dreibrodt
More information about the Pkg-sysvinit-devel
mailing list