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

Re: SQLite and callbacks

From: Stefan Sperling <stsp_at_elego.de>
Date: Tue, 8 Feb 2011 15:17:52 +0100

On Tue, Feb 08, 2011 at 10:50:46AM +0100, Bert Huijben wrote:
>
>
> > -----Original Message-----
> > From: Branko Čibej [mailto:brane_at_xbc.nu] On Behalf Of Branko Cibej
> > Sent: dinsdag 8 februari 2011 4:39
> > To: dev_at_subversion.apache.org
> > Subject: Re: SQLite and callbacks
> >
> > On 07.02.2011 21:51, Stefan Sperling wrote:
> > >> A lot of wc databases out there will be
> > >> so small that the user will hardly notice the memory increase.
> > > All we'd be doing is allowing sqlite to flush data to disk if needed.
> > > Even with a temporary table backed by a file, most operations happen
> > in
> > > memory. Either in buffers managed by sqlite or the operating system's
> > > buffer cache (until sqlite does an fsync). So for small databases it
> > > shouldn't make a difference.
>
> On NTFS just creating a new 0 byte tempfile requires an fsync (and probably a few in a row), so using the in memory buffers instead of a tempfile improved our SQLite performance significantly (and not only on Windows). Assuming using tempfiles was cheap was one of the major slowdowns of WC-1.0 on Windows.
>
>
> Please don't suggest 'just making it file backed' as an easy feature if you only measured it on a non journaling filesystem.
>
>
> With our current query scheme on 'common operations', switching to file based temporary storage will require rewriting almost every sql operation and how we use it to have release acceptable performance on Windows. A simple 'OR' or using a subquery may introduces a temptable.
>
> In this thread we are looking at property storage... which was probably always slower than it is today.
>
> Yes, we can improve that, but please don't suggest introducing a 30% slowdown on the more common code paths like those used in 'svn status' or 'svn update' to improve reading many properties, without measuring the consequences.

I don't think that status will be released in its current form.
It does way too many queries.
We'll need to look into optmizing it using queries with temporary
tables, like Branko suggested for proplist.

Also, there is no need to use the same default on all platforms.
We can use memory-backed temp-tables on windows and file-backed
temp-tables on unix if that's what we need.
Received on 2011-02-08 15:18:41 CET

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.