standard-things / esm

Tomorrow's ECMAScript modules today!
Other
5.26k stars 146 forks source link

Initial system start performance #844

Open elmeister opened 4 years ago

elmeister commented 4 years ago

Switching from @std/esm to esm increased the time between npm run start to Started on port 8080 in our system from about 10 seconds with @std/esm to about 30 seconds with esm. Is there any general advice - if we can try to change some options, or enable debug to track why this may happen? Maybe there are some particular bottleneck qualities that we could pay attention to?

elmeister commented 4 years ago

@jdalton, we appreciate what you do a lot, but we really need help. Any chance someone will look into this issue some day? When we need to debug our code, it makes a huge difference between 10sec and 30sec system start up time. And now, without the support of newer versions of Node in @std/esm and without support of older versions by AWS, we are in a bad position.

thomvaill commented 3 years ago

I have exactly the same issue in this project: https://github.com/thomvaill/log4brains We use esm for our CLI and it adds a constant startup time of ~3s (which is a lot for a CLI). Even if the cache seems to be written, it does not seem the improve performance. Actually, I see no difference when ESM_DISABLE_CACHE is set and when it's not. Maybe this is a cache issue, but I don't know how to debug this. Could you help?