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

Modeldoc generator specifies the page base path, hugo build improvements #20

Conversation

nikitawootten-nist
Copy link
Collaborator

@nikitawootten-nist nikitawootten-nist commented Sep 14, 2023

This PR adjusts the generation script to take advantage of the new option added to the hugo pipeline allowing for the page base path to be specified (fixing all links).

Also changed:

  • RSS feed generation has been disabled, significantly curbing Hugo's memory footprint
  • Hugo's version has been updated (0.110.0 -> 0.118.2), potentially fixing some memory leaks

@nikitawootten-nist nikitawootten-nist changed the title [DO NOT MERGE] Modeldoc generator specifies the page base path Modeldoc generator specifies the page base path Sep 21, 2023
@nikitawootten-nist nikitawootten-nist marked this pull request as ready for review September 21, 2023 19:31
@nikitawootten-nist nikitawootten-nist requested a review from a team as a code owner September 21, 2023 19:31
@nikitawootten-nist nikitawootten-nist force-pushed the nikitawootten-nist/issue12-link-corrections branch from 5c660df to 68cb4f6 Compare September 21, 2023 19:42
- Results show this will cut 32 cumulative seconds off the build and reduce memory usage by 60ish%
@nikitawootten-nist
Copy link
Collaborator Author

nikitawootten-nist commented Sep 21, 2023

GHA impact

Old:

                   |  EN   
-------------------+-------
  Pages            |  831  
  Paginator pages  |    0  
  Non-page files   |   32  
  Static files     | 2043  
  Processed images |    0  
  Aliases          |   73  
  Sitemaps         |    1  
  Cleaned          |    0  

Total in 187913 ms

New:

                   |  EN   
-------------------+-------
  Pages            |  737  
  Paginator pages  |    0  
  Non-page files   |   32  
  Static files     | 2043  
  Processed images |    0  
  Aliases          |   73  
  Sitemaps         |    1  
  Cleaned          |    0  

Total in 57632 ms

Memory Impact (run on my machine with the --printMemoryUsage flag)

Old:

Alloc = 18.7 GB
TotalAlloc = 38.8 GB
Sys = 19.1 GB
NumGC = 32

New:

Alloc = 8.5 GB
TotalAlloc = 18.8 GB
Sys = 9.1 GB
NumGC = 31

Here I believe Alloc refers to the maximum amount of memory in use, TotalAlloc is self explanatory, Sys is available memory, and NumGC is the number of times the Go runtime had to pause the system to garbage collect.

@nikitawootten-nist nikitawootten-nist changed the title Modeldoc generator specifies the page base path Modeldoc generator specifies the page base path, hugo build improvements Sep 21, 2023
@aj-stein-nist
Copy link
Contributor

Give me a few minutes to pull down and test it, but so far eyeballing it, looks good!

@nikitawootten-nist nikitawootten-nist merged commit 6f68085 into usnistgov:main Sep 22, 2023
1 check passed
@nikitawootten-nist nikitawootten-nist deleted the nikitawootten-nist/issue12-link-corrections branch September 22, 2023 17:13
aj-stein-nist pushed a commit that referenced this pull request Sep 28, 2023
…nts (#20)

- Disable Hugo RSS feed generation, curbing memory usage
- Update the GHA's Hugo version to `0.118.2`
- Incorporate the modeldoc pipeline changes from usnistgov/metaschema-xslt#70
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

Successfully merging this pull request may close these issues.

Replace OSCAL data type pages with links to Metaschema datatypes
2 participants