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

fix(perf): refactor to use htmlparser2 #335

Merged
merged 2 commits into from
Oct 5, 2021

Conversation

bcoe
Copy link
Contributor

@bcoe bcoe commented Oct 4, 2021

Refactor to use htmlparser2 which performs parsing in a single pass. This is the same underlying parser used by cheerio.

Why?

This significantly increases the performance of parsing, here are the before and after timings for nodejs-ai-platform (one of our repositories with the largest number of links:)

before:

🤖 Successfully scanned 2166 links in 1267.81 seconds.

after:

🤖 Successfully scanned 2166 links in 407.295 seconds.

bcoe added 2 commits October 4, 2021 15:45
Refactor to use htmlparser2 which performs parsing in a single
pass. This is the same underlying parser used by cheerio.
@JustinBeckwith JustinBeckwith merged commit ce88410 into JustinBeckwith:main Oct 5, 2021
@github-actions
Copy link

github-actions bot commented Oct 5, 2021

🎉 This PR is included in version 2.14.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

None yet

2 participants