status performance and ... chdir
Paul LeoNerd Evans
leonerd at leonerd.org.uk
Wed Sep 10 08:37:29 BST 2008
On Wed, 10 Sep 2008 15:52:11 +1000
Robert Collins <robertc at robertcollins.net> wrote:
> The nice thing about experiments is you can be staggered by the result.
>
> Executive summary: we should chdir. Lots.
Or maybe even open() and fchdir(). It doesn't help the first time, but it
helps when you come "back" again; it avoids another directory name =>
inode lookup in the kernel. Keep a stack of opened directory fds, rather
than names.
Only real downside to this is it starts to eat up your fd limit - 1024
usually. Shouldn't be a major issue except for -really- deep trees. At
which point perhaps you can switch to names if you have a stack taller
than, say, 200 dirs?
--
Paul "LeoNerd" Evans
leonerd at leonerd.org.uk
ICQ# 4135350 | Registered Linux# 179460
http://www.leonerd.org.uk/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20080910/bbc3e164/attachment.pgp
More information about the bazaar
mailing list