electron-userland / electron-compile

DEPRECATED: Electron supporting package to compile JS and CSS in Electron applications
1.01k stars 99 forks source link

Make require a little faster #222

Closed anaisbetts closed 7 years ago

anaisbetts commented 7 years ago

This PR removes the registrations in node.js for extensions you're not using (also, ones that don't actually output JavaScript). This saves a ton of stat calls when you write require('./foo') because node would proceed to run down like 15+ extensions trying to find the right one

Baseline:

image

Extensions optimizations:

image