Hi Everyone,
I am new to the world of HTML source code parsers so feel free to point me in the right direction. I had a general question about the speeds of parser's like JSDOM.
I have a piece of HTML w/ lots of <script src="SOMESCRIPT.js"></script> logic that I need to get the DOM of. I usually use a command that looks like:
const dom = new JSDOM(body, { resources: "usable", runScripts: "dangerously" });
to get my DOMs.
In the
chrome browser it will take usually
less than a second to render. With
jsdom it will take upwards of
10 seconds. (And I have other examples that take minutes to render as well.)
So my question is:
Is the speed difference I noticed between Chrome an jsdom pretty standard? Or am I using jsdom incorrectly and causing some bottleneck?
Thank you very much for the help! I really appreciate it.
-Ali