You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using jsdom, I have two snippets that load the same huge html. One snippet, using html5 as jsdom's parser, takes 70 seconds to process. The other, using just jsdom's parser, takes 10 seconds.
Of course, the lag could be within jsdom itself, but I haven't written a case to test that yet. The gist was initially written for a different bug I filed with jsdom, but it works here too.
This is definitely an edge case, since the html is such a large file (it's probably one of the largest wikipedia documents), but I was testing worst-case scenarios, and 70 seconds is a bit much! :)
The text was updated successfully, but these errors were encountered:
I'm working on this issue. My goal is to get speed close to htmlparser2 speed (may be up to 2 times slower).
Character reference handling is the real hot spot, but this is not the only issue.
Addidinally, I refactor code and change API (I'll create new branch)
Using jsdom, I have two snippets that load the same huge html. One snippet, using html5 as jsdom's parser, takes 70 seconds to process. The other, using just jsdom's parser, takes 10 seconds.
https://gist.github.com/886348#file_html5parser.js : takes 70 seconds, uses html5
https://gist.github.com/886348#file_defaultparser.js : takes 10 seconds, does not use html5
https://gist.github.com/886348#file_get_html.sh : run this quick command to download the test html
Of course, the lag could be within jsdom itself, but I haven't written a case to test that yet. The gist was initially written for a different bug I filed with jsdom, but it works here too.
This is definitely an edge case, since the html is such a large file (it's probably one of the largest wikipedia documents), but I was testing worst-case scenarios, and 70 seconds is a bit much! :)
The text was updated successfully, but these errors were encountered: