[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: Ivan Zhakov <ivan_at_visualsvn.com>
Date: Wed, 9 Feb 2011 17:40:10 +0300

On Tue, Feb 8, 2011 at 12:50, Bert Huijben <bert_at_qqmail.nl> 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),
On Windows there is FILE_ATTRIBUTE_TEMPORARY [1] attribute, which
prevents file to be written to disk:
[[[
Specifying the FILE_ATTRIBUTE_TEMPORARY attribute causes file systems
to avoid writing data back to mass storage if sufficient cache memory
is available, because an application deletes a temporary file after a
handle is closed. In that case, the system can entirely avoid writing
the data. Although it does not directly control data caching in the
same way as the previously mentioned flags, the
FILE_ATTRIBUTE_TEMPORARY attribute does tell the system to hold as
much as possible in the system cache without writing and therefore may
be of concern for certain applications.
]]]

May be we should submit a patch to SQLite to use this attribute?

[1] http://msdn.microsoft.com/en-us/library/aa363858%28v=vs.85%29.aspx

-- 
Ivan Zhakov
VisualSVN Team
Received on 2011-02-09 15:43:01 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.