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

RE: Fresh checkout vs 'svn upgrade': How good is good enough?

From: Bert Huijben <bert_at_qqmail.nl>
Date: Sun, 19 Jun 2011 00:18:48 +0200

> -----Original Message-----
> From: Branko Čibej [mailto:brane_at_xbc.nu] On Behalf Of Branko Cibej
> Sent: zaterdag 18 juni 2011 22:11
> To: dev_at_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 <bert_at_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_at_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
Received on 2011-06-19 00:20:28 CEST

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.