Differences From:
File
tools/cvs2fossil/lib/c2f_prev.tcl
part of check-in
[27ed4f7dc3]
- Extended pass InitCsets and underlying code with more log output geared towards memory introspection, and added markers for special locations. Extended my notes with general observations from the first test runs over my example CVS repositories.
by
aku on
2008-02-16 06:46:41.
[view]
To:
File
tools/cvs2fossil/lib/c2f_prev.tcl
part of check-in
[f46458d5bd]
- Reworked the basic structure of pass InitCSets to keep memory consumption down. Now incremental creates, breaks, saves, and releases changesets, instead of piling them on before saving all at the end. Memory tracking confirms that this changes the accumulating mountain into a near-constant usage, with the expected spikes from the breaking.
by
aku on
2008-02-17 02:06:19.
[view]
@@ -63,8 +63,23 @@
}
return
}
+ destructor {
+ # The main thing is to keep track of the itemmap and remove
+ # the object from it. The lists of changesets (mychangesets,
+ # mytchangesets) are not maintained (= reduced), for the
+ # moment. We may be able to get rid of this entirely, at least
+ # for (de)construction and pass InitCSets.
+
+ foreach iid $myitems {
+ set key [list $mytype $iid]
+ unset myitemmap($key)
+ log write 8 csets {MAP- item <$key> $self = [$self str]}
+ }
+ return
+ }
+
method str {} {
set str "<"
set detail ""
if {[$mytypeobj bysymbol]} {
@@ -133,9 +148,10 @@
$mytypeobj successors tmp $myitems
return [array get tmp]
}
- method breakinternaldependencies {} {
+ method breakinternaldependencies {cv} {
+ upvar 1 $cv counter
log write 14 csets {[$self str] BID}
vc::tools::mem::mark
##
## NOTE: This method, maybe in conjunction with its caller
@@ -289,8 +305,9 @@
Border $fragment s e
integrity assert {$laste == ($s - 1)} {Bad fragment border <$laste | $s>, gap or overlap}
set new [$type %AUTO% $myproject $mytype $mysrcid [lrange $myitems $s $e]]
+ incr counter
log write 4 csets "Breaking [$self str ] @ $laste, new [$new str], cutting $breaks($laste)"
set laste $e