Re: [PATCH] Fix checkout of large files to network shares under Windows XP

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Albert Dvornik
Date: Monday, April 19, 2010 - 3:46 pm

On Mon, Apr 19, 2010 at 4:43 PM, René Scharfe
<rene.scharfe@lsrfire.ath.cx> wrote:
  [...]

That's what I thought initially, since the code would be cleaner, but
I don't like the fact that you could actually end up making a lot more
failed write() calls that way, since you restart the size search on
each call to mingw_write().

For example, suppose you were calling mingw_write() with a count that
was exactly 11.5 times bigger than whatever maximum size write() was
willing to accept.  If you only did one write() per mingw_write(),
letting the caller restart, this will result in 47 failed writes and
16 successes.  Letting mingw_write() do the restart (as in the
existing code) will end up with 4 failed writes and 16 successes.
Now, I assume (wait, this is Windows-- I'd *like to hope*) that a
failed write() is a lot cheaper than a successful one, but this still
rubs me the wrong way.

Of course, if we know (or can guess) the maximum size write() will
take, that would be best.

--bert
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] Fix checkout of large files to network shares unde ..., Sebastian Schuberth, (Mon Apr 19, 5:45 am)
Re: [PATCH] Fix checkout of large files to network shares ..., Albert Dvornik, (Mon Apr 19, 3:46 pm)
Re: [PATCH] Fix checkout of large files to network shares ..., Johannes Schindelin, (Tue Apr 20, 2:15 am)
Re: [PATCH] Fix checkout of large files to network shares ..., Sebastian Schuberth, (Tue Apr 20, 5:42 am)
Re: [PATCH] Fix checkout of large files to network shares ..., Sebastian Schuberth, (Tue Apr 20, 7:21 am)
Re: [PATCH] Fix checkout of large files to network shares ..., Sebastian Schuberth, (Fri Apr 30, 2:08 am)