[Top][All Lists]

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

Re: [PATCH] fts: avoid unnecessary strlen calls

From: Pádraig Brady
Subject: Re: [PATCH] fts: avoid unnecessary strlen calls
Date: Wed, 09 Apr 2014 14:05:03 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2

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?


reply via email to

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