On 14/06/2011 09:03, Timo Teräs wrote: > Busybox modprobe used to be utterly slow before I rewrote it quite a > while ago; the speed up from original code was 10-100x already at the > time. :)
Many thanks for your work! > And not long after that, module-init-tools implemented binary file > formats that can be used to do quicker lookups for modprobe names. I > never bothered to implement that. > > The implementation is "sub-optimal" because it adheres to the old file > formats of module-init-tools. It involves reading the large alias files > for each program invocation. > > Adding support for the binary file formats used by the current > module-init-tools would fix the performance issues. I'm probably still chasing the wrong problem, so please beat me with a clue stick, but I don't see that the performance problems are definitely parsing issues here? My limited reading of the strace results are that it takes 0.05s to read a 137KB text file via busybox and 0.004s to read a 113KB binary file via modules-init-tools. Now I'm sure it's not like with like, but given that both results should be generated with the module.alias files in buffer cache, it feels like it's file reading time which is slow, rather than whether they are binary/text? I do see that module-init-tools appears to do some seeks and so perhaps doesn't read in the entire file, but my instinct is still to wonder whether it's the single character read() calls which might be the majority of the problem? Any thoughts? Thanks Ed W _______________________________________________ busybox mailing list [email protected] http://lists.busybox.net/mailman/listinfo/busybox
