Skip to content

Optimize checking internal link hashes in target files #770

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

Conversation

riccardoporreca
Copy link
Collaborator

@riccardoporreca riccardoporreca commented Sep 23, 2022

By collecting non-duplicate hashes by file and calling the time-consuming create_nokogiri() only once per file.

Should address #768

See the attached output (htmlproofer-output.txt) of running the internal link checks on the build-site site artifact discussed in #768 (comment), via

htmlproofer --disable-external true --log-level debug --checks Links  build-site/
  • The total execution is now around 10 min
  • The output shows also the additional info / debug logs that help tracking how much htmlproofer is doing for checking internal links / hashes
    • in particular, it reflects the new approach of checking internal hashes by target file
    • more in general, it reports at debug level how many individual references to the same internal URL ("metadata") we iterate we have to iterate over

* By collecting non-duplicate hashes by file and calling the time-consuming `create_nokogiri()` only once per file.

Should address gjtorikian#768
@gjtorikian
Copy link
Owner

Wow. Beautiful. Thank you so very much for this work~!

@gjtorikian gjtorikian merged commit fc5eab8 into gjtorikian:main Sep 25, 2022
@riccardoporreca
Copy link
Collaborator Author

My pleasure @gjtorikian!

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.

None yet

2 participants