swift-nio icon indicating copy to clipboard operation
swift-nio copied to clipboard

swift-nio repo takes too long to clone

Open weissi opened this issue 5 years ago • 4 comments

We've gotten more reports that swift-nio is slow to clone and it seems like the in-repo gh-pages branch is becoming a problem. See this:

$ git clone https://github.com/apple/swift-nio.git && cd swift-nio
$ git reflog expire --expire-unreachable=all --all
$ git gc --prune=all
$ du -ks .
44996	.
$ git branch -a | cut -d/ -f3 | grep -v -e HEAD -e gh-pages -e master | while read line; do git checkout $line; done && git checkout master # check out all branches (except gh-pages)
$ git remote remove origin # to make the gh-pages branch unreachable
$ git reflog expire --expire-unreachable=all --all
$ git gc --prune=all
$ du -ks .
10720	.

So it seems that out of the 45 MB in our repo, the gh-pages branch makes up for everything but 11 MB. We ought to move the docs.

CC @tomerd

weissi avatar May 24 '20 19:05 weissi

afaik this is a result of the docsets, which is why I removed them - see https://github.com/apple/swift-nio/pull/1478 for more discussion on that

I suggest the following plan:

  1. remove the docsets from the history which will help this issue
  2. find a new home for docs outside gh-pages like s3 where we can also include the docsets for folks that need/want them

tomerd avatar May 26 '20 22:05 tomerd

Can this potentially get some attention in the near-ish future? 😕

gwynne avatar Aug 16 '20 17:08 gwynne

hey @gwynne sorry for the delay. this is a bit more involved than originally seemed, but we are working to remove the docs from the repo.

tomerd avatar Aug 17 '20 21:08 tomerd

It still takes way too long to clone.

gistya avatar Nov 08 '21 15:11 gistya

The gh-pages branch has been pruned to remove the docs as they are now hosted on the Swift Package Index: https://swiftpackageindex.com/apple/swift-nio/documentation/nio.

Cloning should be much faster now.

glbrntt avatar Jan 31 '23 14:01 glbrntt