Re: svn commit: r1580914 - /subversion/trunk/subversion/libsvn_subr/io.c
From: Julian Foad <julianfoad_at_btopenworld.com>
Date: Mon, 24 Mar 2014 17:31:18 +0000 (GMT)
I reverted this in r1580926.
Bert Huijben wrote:
>> Log:
It effectively added one 'stat' to the code path for whatever client-level operation was performed.
> I don't see why this patch improves the current behavior of this function.
It doesn't, it was only to simplify the code and remove what looked like a dodgy return path.
> The if case you removed checked if the time to wait for is in the past, which
As I explained on IRC, my version eliminated the possibility of calculating a negative delay.
> In these cases we now just wait one second extra...
No, not one extra second; we just wait till the next one-second boundary starting from after the 'stat' rather than starting from before the 'stat'. That adds one 'stat' time on average.
> Originally we always waited (<= 1.5), but then we made use of the delay time
Agreed. And that was a nice touch.
> But now the code is updated to still wait the old long time... after we spend
I've reverted it because I want you to be happy with it and I don't care that much -- the whole thing is a horribly crude hack anyway. If we care about it at all we should make it figure out how long it really needs to wait.
p.s. For other readers, I only started looking at this at all because Philip reported an actual bug whereby the function's 1-millisecond delay is simply wrong for many Linux systems.
- Julian
|
This is an archived mail posted to the Subversion Dev mailing list.
This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.