sccs_addUniqStr() currently has to page all of delta2 into memory. Since the heap saves the tipkey at the time of the last repack we can avoid most of this walk. However since we are rewriting the entire delta table anyway it probably doesn’t matter.
in takepatch we end up pushing the incoming comments to the heap twice. Once when deltas are created in getRecord() then again in cweave.
repacking the cset file is dangerous because changes to the [12s].ChangeSet files need to be atomic. We could save a backup at every repack, but it will double the size of the cset file in every repo.
BTW I was looking at a sample update-only pull and seeing why different commands needed to page in stuff from the cset file. Some interesting points: - probekey pages in all of delta2 doing the tag graph probe because it contains ptag - listkey pages in all of delta2 in sccs_tagcolor(). The graph walk goes to the root - makepatch does an admin(ADMIN_BK) so that walks the entire delta table and pages in everything - takepatch is fast until it needs to validate the checksum, then it reads the entire cset weave to compute the data structure. that pages in 40% of the heap.