> -----Original Message-----
> From: Branko Čibej [mailto:br...@xbc.nu] On Behalf Of Branko Cibej
> Sent: zaterdag 18 juni 2011 22:11
> To: dev@subversion.apache.org
> Subject: Re: Fresh checkout vs 'svn upgrade': How good is good enough?
> 
> On 18.06.2011 16:48, Ivan Zhakov wrote:
> > On Sat, Jun 18, 2011 at 17:30, Bert Huijben <b...@qqmail.nl> wrote:
> >> This assumes creating many tempfiles is cheaper then updating/reading
> >> the db. On Windows that is certainly not the case.
> >>
> > Creating many tempfiles are expensive because APR/Subversion doesn't
> > pass special flag (FILE_ATTRIBUTE_TEMPORARY) to CreateFile Windows API
> > function call. Sqlite uses this flag and performance is much better.
> 
> I've seen this complaint on this list many times, but can't remember a
> single patch proposal to dev@apr to fix it.

The documented performance improvement is on the combination of 
FILE_ATTRIBUTE_TEMPORARY combined with FILE_FLAG_DELETE_ON_CLOSE.

I don't think we can use this flag if we want to refer to these files from the 
workingqueue, which we do to all tempfiles from libsvn_wc during update and 
checkout.

They would be gone once you call svn cleanup.
(The ra and fs layers could certainly use it for their spool files; just like 
SQLite does use it in specific cases).

But I'm not sure if this also helps reducing the time to create the file or 
only in the performance writing to (and reading back from) the file. In my 
measurements it is the creation that causes the real  performance hit on our 
current temp and lock files, while the documented performance improvement is in 
(not) writing the data in the file to disk. And a tempfile with these 
attributes just has a directory entry like any other file, so it might have the 
same bad performance characteristics here.

        Bert

Reply via email to