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

Re: [TSVN] RFC: New cache scheme

From: Peter McNab <mcnab_p_at_melbpc.org.au>
Date: 2005-01-21 11:44:27 CET

SteveKing wrote:

>Let's talk math here:
>Assuming an average path length of 150 chars and 50'000 files under
>version control:
>That's 14,3 MBytes of memory. The status struct is at least twice as
>big, maybe even more since it has filename, UUID, URL strings in it.
>That's a total of 43 MBytes.
>And if you then consider that there are people with even more files
>under version control (the most I heard of until now was in the range
>of 150'000) that memory will be even higher!
>
>Maybe we can assume that people with that many files under version
>control also have enough RAM? I think that's reasonable...
>
>
>
>Change notifications with FindFirstChangeNotification are _very_ slow
>and would hog the whole system a lot. Using ReadDirectoryChanges
>however might be fast enough so the system wouldn't be slowed down a
>lot. And now that we dropped Win98 we actually are able to use that
>API....
>
>Stefan
>
>
>
The following is just a bit of brain-storming without a lot of prior or
resultant consequence thought.

If instead of building an enormous structure in memory why not break the
data up maybe along directory lines and put the required info into small
files, one line per versioned file, one file per directory. Then
maintain these file entries in response to directory change
notifications and as a backup create/update them on OS startup or even
in a low priority background thread. Maybe make a part of the filename a
hash or combination of hashes of the path\filename they pertain to for
faster navigation. Keep these files together in one special folder to
obviate the need to recurse into them. The directory tree structure is
mapped to a file containing a flat list of numeric keys each
corresponding to a path\file entry in each of the above file of files.
Then on refreshing the shell icons read into the cache info from the
small files corresponding to just the displayed directory and file icons.

Peter McNab

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: dev-help@tortoisesvn.tigris.org
Received on Fri Jan 21 11:45:11 2005

This is an archived mail posted to the TortoiseSVN Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.