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

Md5 hash diffing to skip generating unchanged files #316

Merged
merged 5 commits into from
Sep 1, 2024

Conversation

ninjamuffin99
Copy link
Contributor

Simple logic to generate a md5 hash when parsing the .xml files. If the hash is different, it will generate as normal. Otherwise it will skip to the next .xml file to parse and update.

This saves a bit of time, running it on the test files (npx haxe --run Make pages) went from 1.5s to generate the pages, to about 0.9s, so about 150ms saved per .xml

@Simn
Copy link
Member

Simn commented Sep 1, 2024

I can see the appeal, but I don't know if it's really acceptable behavior to generate such auxiliary output files into the input directory...

Plus we create a problem if someone wipes their output directory in order to generate, and then nothing happens because the input didn't change.

How about generating this somewhere under the output directory instead?

@ninjamuffin99
Copy link
Contributor Author

I've changed it to spit it out into the cfg.outputPath, so the dox test site generates the md5 hashes into bin/pages/hashes. Could be somewhere else though or add more specific configuration for paths if required.

@Simn Simn merged commit ef8eaf0 into HaxeFoundation:master Sep 1, 2024
4 checks passed
@skial skial mentioned this pull request Sep 4, 2024
1 task
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.

2 participants