Diff
Not logged in

Differences From:

File tools/cvs2fossil/lib/c2f_pinitcsets.tcl part of check-in [00bf8c198e] - The performance was still not satisfying, even with faster recomputing of successors. Doing it multiple times (Building the graph in each breaker and sort passes) eats time. Caching in memory blows the memory. Chosen solution: Cache this information in the database.

Created a new pass 'CsetDeps' which is run between 'InitCsets' and 'BreakRevCsetCycles' (i.e. changeset creation and first breaker pass). It computes the changeset dependencies from the file-level dependencies once and saves the result in the state, in the new table 'cssuccessor'. Now the breaker and sort passes can get the information quickly, with virtually no effort. The dependencies are recomputed incrementally when a changeset is split by one of the breaker passes, for its fragments and its predecessors.

The loop check is now trivial, and integrated into the successor computation, with the heavy lifting for the detailed analysis and reporting moved down into the type-dependent SQL queries. The relevant new method is 'loops'. Now that the loop check is incremental the pass based checks have been removed from the integrity module, and the option '--loopcheck' has been eliminated. For paranoia the graph setup and modification code got its loop check reinstated as an assert, redusing the changeset report code.

Renumbered the breaker and sort passes. A number of places, like graph setup and traversal, loading of changesets, etc. got feedback indicators to show their progress.

The selection of revision and symbol changesets for the associated breaker passes was a bit on the slow side. We now keep changeset lists sorted by type (during loading or general construction) and access them directly.

by aku on 2007-12-02 20:04:40. [view]

To:

File tools/cvs2fossil/lib/c2f_pinitcsets.tcl part of check-in [e288af3995] - Fluff: Renamed state methods use/reading/writing to usedb/use/extend for clarity. Updated all callers. Extended state module with code to dump the SQL statements it receives to a file for analysis. Extended the 'use' declarations of several passes. by aku on 2007-12-02 23:47:45. [view]

@@ -44,27 +44,29 @@
     typemethod setup {} {
 	# Define the names and structure of the persistent state of
 	# this pass.
 
-	state reading meta
-	state reading revision
-	state reading revisionbranchchildren
-	state reading branch
-	state reading tag
-	state reading symbol
+	state use project
+	state use file
+	state use revision
+	state use revisionbranchchildren
+	state use branch
+	state use tag
+	state use symbol
+	state use meta
 
 	# Data per changeset, namely the project it belongs to, how it
 	# was induced (revision or symbol), plus reference to the
 	# primary entry causing it (meta entry or symbol). An adjunct
 	# table translates the type id's into human readable labels.
 
-	state writing changeset {
+	state extend changeset {
 	    cid   INTEGER  NOT NULL  PRIMARY KEY  AUTOINCREMENT,
 	    pid   INTEGER  NOT NULL  REFERENCES project,
 	    type  INTEGER  NOT NULL  REFERENCES cstype,
 	    src   INTEGER  NOT NULL -- REFERENCES meta|symbol (type dependent)
 	}
-	state writing cstype {
+	state extend cstype {
 	    tid   INTEGER  NOT NULL  PRIMARY KEY  AUTOINCREMENT,
 	    name  TEXT     NOT NULL,
 	    UNIQUE (name)
 	}
@@ -87,9 +89,9 @@
 	# meaning, be in different changesets and so is formally not
 	# unique. So we can only say that it is unique within the
 	# changeset. The integrity module has stronger checks.
 
-	state writing csitem {
+	state extend csitem {
 	    cid  INTEGER  NOT NULL  REFERENCES changeset,
 	    pos  INTEGER  NOT NULL,
 	    iid  INTEGER  NOT NULL, -- REFERENCES revision|tag|branch
 	    UNIQUE (cid, pos),
@@ -105,11 +107,11 @@
 	# Pass manager interface. Executed to load data computed by
 	# this pass into memory when this pass is skipped instead of
 	# executed.
 
-	state reading changeset
-	state reading csitem
-	state reading cstype
+	state use changeset
+	state use csitem
+	state use cstype
 
 	# Need the types first, the constructor in the loop below uses
 	# them to assert the correctness of type names.
 	project::rev getcstypes