[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [APR] apr_file_copy() improvements

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: 2006-03-10 16:55:50 CET

Branko Čibej wrote:
> Julian Foad wrote:
>
>> Since several of you are APR developers, I wonder if one of you would
>> be keen to take up the following issues with apr_file_copy(). We've
>> now got several reasons to re-work it:
>>
>> Correctness:
>>
>> We (Subversion) expect it to do a byte-for-byte copy. To achieve this
>> on some less-common platforms, we have:
>>
>> * Paul Burba's work-around for OS400 going into Subversion.
>>
>> * Max Bowsher's patch for CygWin that he makes to APR when building it.
>>
>> If the APR developers can agree that that is the intended behaviour,
>> both of those patches would be eliminated by documenting that
>> apr_file_copy performs a byte-for-byte copy, and making it open the
>> source and destination in "binary" mode to achieve this. The
>> behaviour would be unchanged on Unix-like platforms.
>>
>>
>> Speed:
>>
>> * Implementation for MS Windows should use the OS's native "file copy"
>> API for much faster performance (and probably better performance in
>> terms of preserving permissions, etc.).
>>
>> * Ditto on any other platforms that provide such an API.
>>
>> * Other implementations should use a buffer bigger than BUFSIZ.
>
> I agree with all of the above, but note that in order for these changes
> to be useful for Subversion, we'll have to implement them on APR's trunk
> and backport to the 1.2.x and 0.9.x branches. Nowever, I'm not sure we
> can actually rely on the changes being in APR, unless we unilaterally
> stop supporting older versions of APR after these changes go into an APR
> release.

That's OK. For the speed improvements, it's normal to expect that a newer
version of a library will have enhancements over an older version, and it's up
to builders and packagers decide which version to use.

The correctness fix (if it's agreed that's what it is) is only needed on
certain platforms, and they will be able to require a recent-enough version of
APR at some point in the future when they decide it's widely enough available.
  Until then, CygWin builders continue to need a local patch and we will be
carrying a work-around in Subversion for OS400. It think, with the OS400 guys'
cooperation, we will be able to remove this work-around as soon as they get a
fixed version of APR.

So, if that makes sense, any volunteers to tackle this in APR? If not, I guess
I'll join the APR list and propose it, but I'd need help testing it as I don't
have any systems except GNU/Linux.

- Julian

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Mar 10 16:56:30 2006

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.