bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] fts: avoid unnecessary strlen calls


From: Bernhard Voelker
Subject: Re: [PATCH] fts: avoid unnecessary strlen calls
Date: Wed, 09 Apr 2014 16:04:04 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0

On 04/09/2014 03:05 PM, Pádraig Brady wrote:
On 04/09/2014 01:25 PM, Bernhard Voelker wrote:
I was wondering why strlen() showed up over 3M times when
running "rm -rf some-dir" - where "some-dir" contained 1M files.
This was shown by "ltrace -c ...".

The attached avoids 2M strlen() invocations for this case.

Sorry that the patch is in an attachment, but "git send-email"
does not work on the box I was on.

Have a nice day,
Berny


Excellent thanks!
This looks correct as dp is invariant over those calls.
Note namelen might be a bit ambiguous as to whether
it's the dirent one or the adjusted fts one.
OK if I s/namelen/dirent_namelen/ and push?

Sure, thanks!

Have a nice day,
Berny



reply via email to

[Prev in Thread] Current Thread [Next in Thread]