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.

ESM - Rollup - Speed

See original GitHub issue

When running the ESM Rollup example, the speed of the build is slow. For me on my laptop (which I think is an “average” developer laptop - see system info below):

  • the initial start time for npm run watch is ~32 seconds
  • subsequent builds when a file is changed takes ~14 seconds image

Ideally the second number - the time it takes to build on file change, would be pretty quick (less than a few seconds) to allow for a good development workflow. Is there any way to speed this up? How fast does this run for others? Thanks!

Environment

  • npm v6.14.14
  • node v14.17.1
  • OS: Windows 10 v1909
  • Processor: Intel core i7-8850H @ 2.60 GHz
  • Memory: 16 GB

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
odoecommented, Aug 18, 2021

vite 4 life

1reaction
gavinrcommented, Aug 18, 2021

Thanks all! I’ll close this as resolved:

  1. Tree-shaking setting (#328) helps a lot
  2. Using rollup only for production build and other options (vite?, nollup?) for development might be valid workarounds for certain situations if the speed-up from above is not enough.
  3. Continued investigation into how to speed up the rollup build when using the ArcGIS API for JavaScript would still be appreciated though 😊
Read more comments on GitHub >

github_iconTop Results From Across the Web

rollup.js
Rollup is a module bundler for JavaScript which compiles small pieces of code into something larger and more complex, such as a library...
Read more >
Slow performance on import a huge ESM script #2536 - GitHub
The best way to avoid unnecessary parsing would be to import the module directly, as in the "fast" method above. All reactions.
Read more >
How to Bundle JavaScript With Rollup — Step-by-Step Tutorial
Rollup is a next-generation JavaScript module bundler. Author your app or library using ES2015 modules, then efficiently bundle them up into a single...
Read more >
Why I use Rollup, and not Webpack | by Paul Sweeney | Medium
Because ESM is syntax, it's very easy to statically analyze.​​ The two import statements at the top can be parsed into an Abstract...
Read more >
The Ultimate Guide to Getting Started with the Rollup.js ...
Rollup.js primarily concentrates on JavaScript so it's fast and lightweight. It's easy to get started but you'll discover plugins for HTML, CSS, ...
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