Differences From:
File
tools/cvs2fossil/lib/c2f_prev.tcl
part of check-in
[9c57055025]
- Performance bugfix. nextmap/premap can still be performance killers and memory hogs. Moved the computation of sucessor changesets down to the type-dependent code (new methods) and the SQL database, i.e. the C level. In the current setup it was possible that the DB would deliver us millions of file-level dependency pairs which the Tcl level would then reduce to tens of actual changeset dependencies. Tcl did not cope well with that amount of data. Now the reduction happens in the query itself. A concrete example was a branch in the Tcl CVS generating nearly 9 million pairs, which reduced to roughly 200 changeset dependencies. This blew the memory out of the water and the converter ground to a halt, busily swapping. Ok, causes behind us, also added another index on 'csitem(iid)' to speed the search for changesets from the revisions, tags, and branches.
by
aku on
2007-12-02 05:49:00.
[view]
To:
File
tools/cvs2fossil/lib/c2f_prev.tcl
part of check-in
[f7cca3f082]
- Fix table linkage in query, and duplicated conditions :(
by
aku on
2007-12-02 06:17:59.
[view]
@@ -1078,17 +1078,17 @@
SELECT C.cid
FROM revision R, csitem CI, changeset C
WHERE R.rid IN $theset -- Restrict to revisions of interest
AND R.child IS NOT NULL -- Has primary child
- AND CI.iid = R.rid
+ AND CI.iid = R.child
AND C.cid = CI.cid
AND C.type = 0
UNION
SELECT C.cid
FROM revision R, revisionbranchchildren B, csitem CI, changeset C
WHERE R.rid IN $theset -- Restrict to revisions of interest
AND R.rid = B.rid -- Select subset of branch children
- AND CI.iid = R.rid
+ AND CI.iid = B.brid
AND C.cid = CI.cid
AND C.type = 0
UNION
SELECT C.cid
@@ -1097,12 +1097,9 @@
AND R.isdefault -- Restrict to NTDB
AND R.dbchild IS NOT NULL -- and last NTDB belonging to trunk
AND RA.rid = R.dbchild -- Go directly to trunk root
AND RA.child IS NOT NULL -- Has primary child.
- AND CI.iid = R.rid
- AND C.cid = CI.cid
- AND C.type = 0
- AND CI.iid = R.rid
+ AND CI.iid = RA.child
AND C.cid = CI.cid
AND C.type = 0
UNION
SELECT C.cid