Skip to content
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

Investigate whether PDF/HTML generated for all versions are in git repo history #1287

Open
jafingerhut opened this issue Jun 23, 2024 · 2 comments

Comments

@jafingerhut
Copy link
Collaborator

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.

@jafingerhut
Copy link
Collaborator Author

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: p4lang/pna@a791747

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.

@jafingerhut
Copy link
Collaborator Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant