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

Update html-proofer gem for better performance #2169

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

azuchi
Copy link
Contributor

@azuchi azuchi commented Feb 8, 2025

The following command to check for broken links:

bundle exec htmlproofer --check-html --disable-external --url-ignore '/^\/bin/.*/' ./_site

Currently (version 3.15.0) takes 271.221 seconds in my local environment.
If upgrade to 3.19.4, it will take 128.295 seconds, which is about half the time.

One of the factors that contributed to the performance improvement is gjtorikian/html-proofer#590, and the rest is likely due to external dependent libraries.

Upgrading html-proofer to 4.0 or later will break the current build, so I'm sticking to the 3.0 series.

@jirijakes
Copy link
Contributor

It works! Although I measured only 40 second speedup from 190 s to 150 s, it is still a great improvement.

@bitschmidty
Copy link
Contributor

Ive had issues running the proofer since updating to the latest macOS versions (and hardware) in the last ~year. Ive just ignore those issues, partially since we will eventually move to Hugo and I can still do build previews which is most of my workflow. And also since troubleshooting was unfruitful.

So I cannot directly test this performance improvement change.

Note: Installing the latest dependencies for this PR on macOS did require a workaround so Ill leave this breadcrumb for others with the issue: https://danielabaron.me/blog/fix-gem-install-errors-m3-mac-ruby-278/#nokogiri

Given the builds can be sensitive, Ill hold off on merging this until I get feedback from @harding that this doesn't interrupt (and in fact, should help!) his workflow.

@harding
Copy link
Collaborator

harding commented Feb 18, 2025

Sounds and looks great to me! I'll try to test it today if I get a chance, but if I haven't replied within 36 hours, it has my ACK.

Copy link
Contributor

@bitschmidty bitschmidty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK, per my comment

With @jirijakes and @harding acks Im inclined to merge

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.

4 participants