monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Monotone-devel] Re: monotone CVS import failed.


From: Markus Schiltknecht
Subject: [Monotone-devel] Re: monotone CVS import failed.
Date: Tue, 17 Oct 2006 18:31:28 +0200
User-agent: Thunderbird 1.5.0.7 (X11/20060927)

Jon Smirl wrote:
The filename seems obvious, how else would I know what file a cvs_event
is bound to? And the CVS revision is kept for informative purpose: I
want users to be able to determine, what CVS revisions a certain
monotone revision consists of.

You still have a C++ object for the file, just no need to store the file name.

Huh? What do you mean by 'store'? On disk? What does that have to do with memory consumption?

I very much doubt it's more than 100MB, though. It's roughly:

(different files + different version strings) * (avg str length) +
sizeof(int) * (total cvs events) * 2

110,000 files with 1.1M revs. 1,100 branches and 1,000 symbols.

Assuming 1.1 M revs is the amount of 'total cvs events', as I'm naming it, that's roughly:

(110'000 * 2) * (avg str length) +
4 * 1.1M * 2

So your avg. string length may be up to ca. 420 bytes and it still all fits into 100 MB of RAM.

Assuming the (avg str length) is 1K (!), you could theoretically store
more than 52K *distinct* filenames and over 13M pointers (thus over 6 M
total cvs events) in 100 MB of memory (assuming 50% - 50% sharing
between the two summands).

The other systems identify the rev by file name + rev#, when you do
that over 1M revs it really gets big.

Sure.

Look: I'm storing two pointers, one for the filename and one for the RCS version string. That's 8 bytes per cvs event (every commit in every file). Plus every filename and RCS version string exactly *once*, so these pointers can point somewhere meaningful. That avoids storing filenames and RCS version strings multiple times.

Regards

Markus




reply via email to

[Prev in Thread] Current Thread [Next in Thread]