Open jafingerhut opened 5 months ago
Here is a change made in 2022-Nov to the repo https://github.com/p4lang/pna recommended to me by Antonin Bas that helps keep only the latest version of auto-generated PDF and HTML docs for the PNA specification in the gh-pages
branch of that repo: https://github.com/p4lang/pna/commit/a791747b3aa3ea033771fd082b6887f17ed92ddb
The p4runtime
repo also uses the --amend
option for this purpose.
As far as I can tell, the p4-spec
repo does not use this --amend
option when committing new generated HTML and PDF files to the gh-pages
branch, thus it has full history of all generated versions stored in its commit history.
I do not know how to calculate the precise quantitative effect of this, but as a rough kind of evidence that storage is creeping up on the p4-spec repository:
The p4c repository totals 105 MBytes of size in its .git directory, containing compressed deltas/versions of all files of the repo's entire history covering 3457 commits, and has 81 MBytes of files in its most recent version (outside of the .git directory). This averages 105MB/3457commits = 30KBytes/commit
The p4-spec repository totals 177 MBytes of size in its .git directory, with 1905 commits, and has 56 MBytes of files in its most recent version (outside of the .git directory). This averages 177MB/1905commits = 93KBytes/commit
I am not sure, but I think that the way that PDF/HTML is generated for the language spec, the p4lang/p4-spec repository grows in size every time a commit is made to the repo. I believe some other p4lang spec repos, e.g. p4runtime, do auto-generate PDF/HTML on every commit, but in a way that only the most recent PDF/HTML are ever in the git repo, not the history of all revisions. I believe that binary PDF does not compress well with git across small changes in the source text.