question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Improve startup performance.

See original GitHub issue

jsdom’s require performance is quite slow. It takes about 500ms on my MBP" and it is the slowest part in Jest’s startup. If we could reduce this to 100ms, that would be super awesome.

Example:

console.time('jsdom');
require('jsdom');
console.timeEnd('jsdom');
jsdom: 490.010ms

Could we try to compile jsdom with inline-requires ( https://github.com/facebook/fbjs/blob/master/scripts/babel-6/inline-requires.js )? It has helped facebook.com’s startup performance. This of course is only useful if a lot of things in jsdom are required but not used when creating an instance of jsdom.

Issue Analytics

  • State:open
  • Created 7 years ago
  • Reactions:8
  • Comments:14 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
ForbesLindesaycommented, Aug 12, 2016

A very brief investigation seems to suggest that we can cut ~80ms from cssstyle/lib/CSSStyleDeclaration.js’s time to require by inlining all the css properties. I’m going to see if I can build something a little bit more thorough though.

0reactions
SagnikPradhancommented, Sep 26, 2020

I wonder, does bundling with rollup make any difference?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Speed Up Windows 10 Startup in 3 Simple Steps
To enable Fast Startup, follow these simple steps. First, open the Windows Control Panel. Next, go to the Power Options screen. When there,...
Read more >
Get Moving: How to Make Your Windows PC Boot Faster
Enable Windows' Fast Startup Mode · Adjust Your UEFI/BIOS Settings · Cut Down on Startup Programs · Let Windows Updates Run During Downtime...
Read more >
How to Speed Up Boot Time on Your PC or Laptop - AVG
How to Speed Up Boot Time on Your PC or Laptop · Limit startup programs · Enable fast startup for Windows 10 ·...
Read more >
17 ways to speed up Windows 10 | Computerworld
17 ways to speed up Windows 10 · 1. Change your power settings · 2. Disable programs that run on startup · 3....
Read more >
6 Ways to Speed Up Your Windows Startup Time
Reboot Your Computer! · Limit Unwanted Startup Programs · Get Rid of Unnecessary Programs · Check for Windows Updates · Update Your Graphics...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found