[TUHS] [SPAM] Re: SCCS

Tony Finch dot at dotat.at
Thu Sep 12 23:44:45 AEST 2019


Larry McVoy <lm at mcvoy.com> wrote:

> If you have actual data that shows RCS to be faster I would like to
> see that.  RCS read the whole file.  It could have been faster, it could
> have put the offset into the file where the most recent version begain.
> But it didn't.  It read the entire file.

In RCS the most recent version of the file is near the start of the ,v
file after a list of revisions, so it doesn't have to read the deltas for
the common case of checking out the current version of a file. I think
there must be a similar optimization to copy the deltas without processing
them when committing a new revision. But yes, as soon as you get away from
working on the latest revision of the main branch, RCS becomes
quadratically slow.

A few years ago I converted a decades-old SCCS working tree to git.
Because there are very good tools for converting from CVS to git, I
decided to convert SCCS to RCS (which is mostly a trivial file-at-a-time
format conversion, in the absence of branches and tags) to CVS (which is
just moving the RCS files to the right place) to git.

The most annoying part of this was the accidentally quadratic process of
dealing with all the old revisions in RCS files. I could mostly avoid
slowness if I arranged never to check out old revisions, aiming to treat
RCS as append-only until the final cvs-fast-export stage. This kept things
acceptably fast (closer to linear in the size of the file rather than
quadratic) even for that one very large frequently updated file.

Detailed write-up at https://fanf.dreamwidth.org/105694.html
(I subsequently re-used a lot of the machinery for converting another
much smaller SCCS repository. It was a lot easier the second time!)

[ PS. https://accidentallyquadratic.tumblr.com is great ]

Tony.
-- 
f.anthony.n.finch  <dot at dotat.at>  http://dotat.at/
Lough Foyle to Carlingford Lough: Southwesterly at first in southeast,
otherwise westerly or northwesterly 4 or 5, occasionally 6 at first. Moderate
or rough in north, otherwise slight or moderate, becoming smooth or slight in
east. Rain at first. Moderate or poor, becoming good.


More information about the TUHS mailing list