-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reduce size of gh-pages branch #8059
Comments
As a test I pushed the develop branch and a squashed gh-pages to https://github.com/matschaffer/scratch-gui-squashed-gh-pages It"s not tiny but the clone size seems to have been cut by about 70% (~1.9GB to ~400MB)
Another option could be moving gh-pages to another repo that would just be used for publishing rather than development. |
The gh-pages assets still definitely make up the larger blobs of the repo.
There are some larger animated gifs in the source, but they seem to be mostly 1-2MB whereas the sourcemaps and minimized JS files are in the 10-20MB range and there are lots more of those in the published site. |
To test the "alternate repo" idea I pushed just develop to another fork and cloned that:
And confirmed that now it"s mainly the gif blobs that make up the space:
|
I also came across this if we wanted to try other options https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/ |
Expected Behavior
A fully functional git clone without a multi-GB download.
Actual Behavior
Full repo clone takes ~2GB
Steps to Reproduce
git clone [email protected]:LLK/scratch-gui.git
There are a couple issues that cover this:
The typical answer is to clone with
--depth 1
but this (to my understanding) would leave the clone unable to be used as a development/PR workspace.(from #5140 (comment))
I was curious so I tried this https://stackoverflow.com/a/42544963/69002
It seems like what"s taking up a lot of the space is dependencies being commited to the gh-pages branch. LIke d33ef36 for example.
Those lib.min.js seem to be 15MB-20MB each and get committed a few times a day in a few different subdirectories.
We could eliminate about half of the current repo size by pushing a fresh gh-pages branch with every build.
Something like:
Clients will see something like this on their next pull:
But this doesn"t seem to require intervention. I was even able to commit to gh-pages and the next pull rebased successfully.
Doing this would allow easier clones of the repository, and also probably eliminate a good portion of the 1.5 minute clone time on circleci seen currently.
Alternatively we could move gh-pages to a separate repo, but this would require a bit more coordination for anything using the deployed gh-pages site (possibly https://scratch.mit.edu itself? not sure if it"s using gh-pages directly or not).
The text was updated successfully, but these errors were encountered: