Fossil User Forum

Tip for improving clone speeds for hosters (delta compression)
Login

Tip for improving clone speeds for hosters (delta compression)

Tip for improving clone speeds for hosters (delta compression)

(1) By Andy Bradford (andybradford) on 2023-11-25 03:10:15 [link] [source]

In my efforts to make it possible to resume a failed clone, I discovered
something quite  interesting. When I  first started the work,  I noticed
that clones  of my local Fossil  repository were taking a  long time and
thought it  was some inefficiency  that I had  added with my  changes. I
spent quite a few hours trying to debug my code and then I realized that
it wasn't my code at all. It was the fact that my repository was old and
that I hadn't rebuilt  it in a long time and so it  didn't have a lot of
delta compression as a result.

My Fossil repository was close to 350MB and so it would take a long time
and many round-trips of clone protocol  before it would complete. Then I
realized that the reason why my repository was so big---and consequently
took so long to clone---was because over the years it had received a lot
of uncompressed  content. So  I ran "fossil  rebuild --compress"  and it
reduced the  repository size significantly  (down to 64MB  approx.), and
consequently  my clones  happen  much  more quickly  now.  I suppose  in
retrospect I could have just  run "fossil rebuild --compress-only" but I
was in a hurry and didn't notice that option.

Long story short,  for those who publish Fossil repositories  with a lot
of commits, you can improve the user experience for those who clone your
repository by running "fossil rebuild --compress-only" every so often.

Andy

(2) By Richard Hipp (drh) on 2023-11-25 13:47:14 in reply to 1 [link] [source]

Or, periodically run:

fossil all repack

This will do lots of compression on all of your repositories. You could perhaps set up a cron job to do that once a week or something.

(3) By Andy Bradford (andybradford) on 2023-11-25 15:13:57 in reply to 2 [source]

> fossil all repack

Yes, even better.