Re: [RFC/PATCH v2 1/1] cygwin: Add fast_lstat() and fast_fstat() functions

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

 



Mark Levedahl wrote:
> On 07/15/2013 10:06 PM, Torsten Bögershausen wrote:
>> On 2013-07-15 21.49, Junio C Hamano wrote:
>>> Mark Levedahl <mlevedahl@xxxxxxxxx> writes:
>>>
>>>>> In order to limit the adverse effects caused by this implementation,
>>>>> we provide a new "fast stat" interface, which allows us to use this
>>>>> only for interactions with the index (i.e. the cached stat data).
>>>>>
>>>>> Signed-off-by: Ramsay Jones <ramsay@xxxxxxxxxxxxxxxxxxx>
>>>>> ---
>>>> I've tested this on Cygwin 1.7 on WIndows 7 , comparing to the results
>>>> using your prior patch (removing the Cygwin specific lstat entirely)
>>>> and get the same results with both, so this seems ok from me.
>>>>
>>>> My comparison point was created by reverting your current patch from
>>>> pu, then reapplying your earlier patch on top, so the only difference
>>>> was which approach was used to address the stat functions.
>>>>
>>>> Caveats:
>>>> 1) I don't find any speed improvement of the current patch over the
>>>> previous one (the tests actually ran faster with the earlier patch,
>>>> though the difference was less than 1%).
>> Hm, measuring the time for the test suite is one thing,
>> did you measure the time of "git status" with and without the patch?
>>
>> (I don't have my test system at hand, so I can test in a few days/weeks)
> Timing for 5 rounds of "git status" in the git project. First, with the 
> current fast_lstat patches:
> /usr/local/src/git>for i in {1..5} ; do time git status >& /dev/null ; done
> 
> real    0m0.218s
> user    0m0.000s
> sys     0m0.218s
> 
> real    0m0.187s
> user    0m0.077s
> sys     0m0.109s
> 
> real    0m0.187s
> user    0m0.030s
> sys     0m0.156s
> 
> real    0m0.203s
> user    0m0.031s
> sys     0m0.171s
> 
> real    0m0.187s
> user    0m0.062s
> sys     0m0.124s
> 
> Now, with Ramsay's original patch just removing the non-Posix stat 
> functions:
> /usr/local/src/git>for i in {1..5} ; do time git status >& /dev/null ; done
> 
> real    0m0.218s
> user    0m0.046s
> sys     0m0.171s
> 
> real    0m0.187s
> user    0m0.015s
> sys     0m0.171s
> 
> real    0m0.187s
> user    0m0.015s
> sys     0m0.171s
> 
> real    0m0.187s
> user    0m0.047s
> sys     0m0.140s
> 
> real    0m0.187s
> user    0m0.031s
> sys     0m0.156s
> 
> 
> I see no difference in the above. (Yes, I checked multiple times that I 
> was using different executables).

Hmm, that looks good. :-D

Torsten reported a performance boost using the win32 stat() implementation
on a linux git repo (2s -> 1s, if I recall correctly) on cygwin 1.7.
Do you have a larger repo available to test?

If performance isn't an issue (it isn't for _me_), then I will happily
re-submit my original patch (removing the win32 stat implementation).

[Hmm, I may do anyway!]

ATB,
Ramsay Jones


--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]