aboutsummaryrefslogtreecommitdiffstats
path: root/src/repository.h
diff options
context:
space:
mode:
authorRaja R Harinath <harinath@hurrynot.org>2010-07-10 16:20:04 +0530
committerRaja R Harinath <harinath@hurrynot.org>2010-07-10 19:22:23 +0530
commitffc5270a6fa106fecad1a6a9f1520ca8f075c6b7 (patch)
treef462a048af9b9bba21836c799df09b2eb9f11611 /src/repository.h
parent45d4785557290facfa344e7fb4586fca41a84bbe (diff)
downloadsvn2git-ffc5270a6fa106fecad1a6a9f1520ca8f075c6b7.tar
svn2git-ffc5270a6fa106fecad1a6a9f1520ca8f075c6b7.tar.gz
svn2git-ffc5270a6fa106fecad1a6a9f1520ca8f075c6b7.tar.bz2
svn2git-ffc5270a6fa106fecad1a6a9f1520ca8f075c6b7.tar.xz
svn2git-ffc5270a6fa106fecad1a6a9f1520ca8f075c6b7.zip
Reduce size of fast-import marks file by not persisting file-level marks
Use two allocators for marks, one persistent commit counter that starts at 0 and counts up commits, and a transitional counter, for files, that counts down from maxMark, and is reset on each SVN revision. Note that the marks file will still have marks for some, but not all, files. The number of such marks is limited by the size of the SVN revision that affects the most files. For instance, this changed the size of one marks file from 19M to 3.2M. fast-import issues: We currently set maxMark = (1<<20)-1. Anything large seems to trigger a bug in the sparse array dumping routine in git-fast-import in certain versions of git.
Diffstat (limited to 'src/repository.h')
-rw-r--r--src/repository.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/repository.h b/src/repository.h
index f7beb99..728b2ab 100644
--- a/src/repository.h
+++ b/src/repository.h
@@ -97,12 +97,21 @@ private:
QProcess fastImport;
int commitCount;
int outstandingTransactions;
- int lastmark;
+
+ /* starts at 0, and counts up. */
+ int last_commit_mark;
+
+ /* starts at maxMark and counts down. Reset after each SVN revision */
+ int next_file_mark;
+
bool processHasStarted;
void startFastImport();
void closeFastImport();
+ // called when a transaction is deleted
+ void forgetTransaction(Transaction *t);
+
friend class ProcessCache;
Q_DISABLE_COPY(Repository)
};