On Sunday 13 July 2008 11:57, Rob Landley wrote:
> On Saturday 12 July 2008 05:36:05 Denys Vlasenko wrote:
> > BTW: there is a speedup opportunity in mdev -s: we parse config file
> > repeatedly (which includes compiling regexp) for each device scanned!
> 
> Which is generally a cache local activity, probably not even as expensive as 
> a 
> system call (although I admit I haven't benched it with that in mind and it 
> could vary by platform).  I do know that back when I _did_ bench it for 
> overall performance, it did quite well.

make_device() opens a config file and reads it all. And with mdev -s,
maked_device is called for every device. So opening/reading/closing
is repeated many times.

> The alternative is keeping the config file and all its compiled regexes in 
> memory

This is a valid point, yes. Didn't think about it.
--
vda
_______________________________________________
busybox mailing list
[email protected]
http://busybox.net/cgi-bin/mailman/listinfo/busybox

Reply via email to