Fossil

File History
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

History of tools/cvs2fossil/lib/c2f_pinitcsets.tcl

2008-02-24
04:43
New command 'state foreachrow' for incremental result processing, using less memory. Converted a number of places in pass InitCSet to this command, and marked a number of othre places for possible future use. file: [14fdb6d3] check-in: [6559f323] user: aku branch: trunk, size: 11534
2008-02-23
06:33
Fixed bug made in [f46458d5bd] which prevented the saving of the changesets generated by the breaking of the internal dependencies. file: [37791a27] check-in: [b3d61d78] user: aku branch: trunk, size: 11388
2008-02-17
02:06
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. file: [8351f6b6] check-in: [f46458d5] user: aku branch: trunk, size: 11237
2008-02-16
06:46
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. file: [9999ef81] check-in: [27ed4f7d] user: aku branch: trunk, size: 11364
2008-02-06
05:04
Updated the copyright information of all files touched in the new year. file: [eda30d7e] check-in: [66235f24] user: aku branch: trunk, size: 10806
2008-01-30
08:23
Broke package dependency cycle introduced when moving the cset load code from the InitCsets pass to the cset class. file: [97c1e143] check-in: [9e1b461b] user: aku branch: trunk, size: 10801
03:23
Moved the code loading changesets from state to its proper class. file: [0ab46f96] check-in: [49dd66f6] user: aku branch: trunk, size: 10763
2007-12-02
23:47
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. file: [87cc4829] check-in: [e288af39] user: aku branch: trunk, size: 11213
20:04
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. file: [ced4d957] check-in: [00bf8c19] user: aku branch: trunk, size: 11217
05:49
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. file: [f56c12b5] check-in: [9c570550] user: aku branch: trunk, size: 11181
2007-11-30
03:57
Replaced the checks for self-referential changesets in the cycle breaker with a scheme in the changeset class doing checks when splitting a changeset, which is also called by the general changeset integrity code, after each pass. Extended log output at high verbosity levels. Thorough checking of the fragments a changeset is to be split into. file: [39a67db2] check-in: [b42cff97] user: aku branch: trunk, size: 11122
2007-11-29
09:16
Renamed state table 'csrevision' to 'csitem' to reflect the new internals of changesets. Updated all places where it is used. file: [b1c3a78e] check-in: [80b1e893] user: aku branch: trunk, size: 11103
07:47
More realignment of variable names with their content, in pass 5. file: [37a8f5de] check-in: [27f093d2] user: aku branch: trunk, size: 11120
06:21
Brought knowledge of the new types to the state definition, changed the creation of the initial changesets to use tags and branches. file: [cec097c0] check-in: [215d2f1a] user: aku branch: trunk, size: 11156
2007-11-27
08:59
Bugfix in the generation of the initial symbol changesets. Keep entries apart per line-of-development. file: [30453369] check-in: [2e07cd71] user: aku branch: trunk, size: 10948
04:26
Continued work on the integrity checks for changesets. Moved callers out of transactions. Two checks are already tripping on bad changesets made by InitCSets (pass 5). file: [3b39c5f0] check-in: [8c6488de] user: aku branch: trunk, size: 10779
02:37
Outline for more integrity checks, focusing on the changesets. file: [47d97866] check-in: [bf83201c] user: aku branch: trunk, size: 10787
2007-11-25
07:54
Code cleanup. Removed trailing whitespace across the board. file: [217d875a] check-in: [b679ca33] user: aku branch: trunk, size: 10624
2007-11-22
03:11
Modified the API for the construction of changesets a bit, now allowing their construction with the correct id, instead of correcting it later. Updated pass 5 to use this, and fixed bug where the id counter for changesets was left uninitialized, allowing the improper generation of duplicate ids. file: [940095b7] check-in: [65be27aa] user: aku branch: trunk, size: 10626
2007-11-16
08:32
Added convenience command to the state package when the sql returns a single row. Added more statistics about revisions, tags, branches, symbols, changesets to various passes. file: [10710518] check-in: [96b7bfb8] user: aku branch: trunk, size: 10614
03:52
Bugfix. In pass 5, loading the changesets used the type codes instead of the type names. Modified the SQL selecting the data to return the proper names. file: [bb434d64] check-in: [341d96be] user: aku branch: trunk, size: 10577
2007-11-13
05:09
Reworked the in-memory storage of changesets in pass 5 and supporting classes, and added loading of changesets from the persistent state for when the pass is skipped. file: [960f3c67] check-in: [24c0b662] user: aku branch: trunk, size: 10537
2007-11-10
23:44
Rewrote the algorithm for breaking internal dependencies to my liking. The complex part handling multiple splits has moved from the pass code to the changeset class itself, reusing the state computed for the first split. The state is a bit more complex to allow for its incremental update after a break has been done. Factored major pieces into separate procedures to keep the highlevel code readable. Added lots of official log output to help debugging in case of trouble. file: [046ff5e2] check-in: [08ebab80] user: aku branch: trunk, size: 10315
20:40
Oops. pass 5 is not complete. Missed the breaking of internal dependencies, this is done in this pass already. Extended pass _2_ and file revisions with code to save the branchchildren (possible dependencies), and pass 5 and changesets with the proper algorithm. From cvs2svn, works, do not truly like it, as it throws away and recomputes a lot of state after each split of a cset. Could update and reuse the state to perform all splits in one go. Will try that next, for now we have a working form in the code base. file: [8f42ee8f] check-in: [95af789e] user: aku branch: trunk, size: 11223
07:46
Completed pass 5, computing the initial set of changesets. Defined persistent structure and filled out the long-existing placeholder class (project::rev). file: [aae0715d] check-in: [5f7acef8] user: aku branch: trunk, size: 9397
05:34
Started on pass 5, computing the initial approximate set of project level revisions, aka 'ChangeSets'. Skeleton of the pass added. file: [60ccdc28] check-in: [54d1e353] user: aku branch: trunk, size: 2863 Added