On Mar 19, 2009, at 6:46 AM, Kees Nuyt wrote:

> On Thu, 19 Mar 2009 10:03:26 +0100, you wrote:
>
>> Hi,
>>
>> I would use a binary (*.tgz) file in my repository. The file is  
>> near 20 MB.
>> The first add is immediately. After changing the file, the commit  
>> takes
>> nearly half an hour?
>>
>> Test case with file test/t.tgz:
>> fossil new t.fsl
>> cd test
>> fossil open ../t.fsl
>> fossil add t.tgz
>
> The add command doesn't import t.tgz into the repository, it
> just registers that it is one of the files to watch.
>
>> # change file t.tgz
>> fossil commit t.tgz  --> takes very long
>
> Commit imports the file. This means a 20 MByte blob has to
> be written in the repository, which is an sqlite database.
> 20 MByte is a lot of overflow pages...


I keep all of my OpenOffice presentation slides in a single fossil  
repository.  I don't have any 20MB *.odp files, but I have many that  
are in the 5 MB range.  The difference between 5MB and 20MB is not  
that much.  And yet, I have no difficulty checking in or checking out  
or cloning this repository.  It takes seconds.

Another fossil project (available on-line at 
http://www.sqlite.org/sqllogictest) 
  consists of over 600 files, most of which are over 1MB in size.   
There are no single files in the 20MB range, but the cumulative size  
is over 1GB.  On that repository, the "fossil changes" command takes  
about 30 seconds since it has to sha1 checksum 1GB of data.  But if I  
change to "fossil setting mtime-changes on" so that it only looks at  
the mtime of files to see what has changed, then "fossil changes"  
takes 48 milliseconds.  A couple of sha1 and md5 checksums still need  
to be computed on a check-in or check-out so those are still expensive  
operations, requiring a minute or so.  But nothing like 30 minutes.

So I do not know what the problem might be....

If this is an SQLite database overflow chain problem, it can perhaps  
be reduced by running:

      sqlite3 t.fsl 'pragma page_size=16384; vacuum'

The command above (on recent versions of SQLite) will change the  
database page size from 1K to 16K which will shorten the overflow  
chains by a factor of 16.  Please try it out and let me know if it  
helps any.

D. Richard Hipp
d...@hwaci.com



_______________________________________________
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to