General speed questions versus a browser like chrome

23 views
Skip to first unread message

Ali Unwala

unread,
Dec 14, 2018, 1:35:00 PM12/14/18
to jsdom
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

Domenic Denicola

unread,
Dec 14, 2018, 10:46:45 PM12/14/18
to js...@googlegroups.com

Hey there,

 

Can you try the just-released v13.1.0? We had a major speed regression for pages that had large inline <script> and <style> elements between v11.6.0 and v13.1.0.

--
You received this message because you are subscribed to the Google Groups "jsdom" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jsdom+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages