New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bundling is too slow for development #2716
Comments
Disable source maps in commonjs plugin to reduce generating time and memory usage. commonjs({ sourceMap: false }) In the past output.indent also could take a lot. Not sure about now. And still, rollup is primary production tool. It doesn't have fast and scalable development mode. In large projects it can be very slow for dev. |
@TrySound That does not seem to give any perf/memory boost. I tried setting Is there a way to check if the
What is the ideal development workflow then ? Any pointers to the projects ? The starter project and guides seem to point to using rollup with the |
Note that there is no caching yet, even in watch mode, unless you explicitly pass a cache object: https://rollupjs.org/guide/en#cache |
@lukastaegert What about this from @Rich-Harris #1100 (comment) Is this not correct anymore ? |
Just throwing it out there, because it's designed for an app development workflow: https://github.com/PepsRyuu/nollup 👀 |
I tried to manually use the Javascript API to use caching, I also marked one of the large dependencies as external to see if it reduces the build time.
Here is the time split:
Note the huge
Now note the huge, Also, bundle.generate takes ~20s. |
FWIW, I tried using |
I'm interested in this too. I'm not seeing build-times this bad, but for comparison I'm getting incremental build times in Webpack to be about 200ms, in Rollup it's above 1000ms. I've disabled all the features I could find in Rollup, only sourcemaps should still be active (but they are in Webpack too). This is currently keeping me from switching to Rollup for development. |
My setup used to bundle very fast but don't know where was it come from, maybe after update to 1.7 or 1.10 (automate by greenkeeper), it takes 5 minutes to bundle, very bad experience. I've spent time to migrate from webpack to rollup several months ago and now feel tired to think about another migration :( |
@viiiprock Show you config |
Here is my config
|
Actually, you can find my config which was good before here |
It would also be helpful if you could pin the issue down to an exact patch version. |
I'm not sure but it was good at 1.7, currently I'm at 1.10.0 |
@viiiprock It's not a Rollup issue, it's an issue with For cross reference, I found this issue: ezolenko/rollup-plugin-typescript2#148 |
Incredible, thanks @PepsRyuu |
@PepsRyuu You saved my day... Thanks soooo much... |
Has anyone tried https://github.com/nathan/pax bundler ? |
@GrosSacASac I'm not sure this is the proper place to discuss alternative bundlers. The context of this issue is @ashubham's issue. Alt bundler discussions are off-topic for this issue. |
This comment has been minimized.
This comment has been minimized.
Sorry folks, after the last snarky comment, we're going to lock this one. Maintainers may follow up with more information as it's available. |
It looks like the issue boils down to a problem with ezolenko/rollup-plugin-typescript2#148 and the author there is blocked. We'll open a new discussion internally to see if there's anything that can be done here. Closing for now. |
How Do We Reproduce?
My Rollup config looks like this:
I run the rollup bundler using this command:
Expected Behavior
It should be faster to build the bundle, like maybe <5s to be able to use it for development. This output is in the watch mode.
Actual Behavior
created target/module in 29.8s
BUILD: 18915ms, 957 MB / 2.62 GB
parse modules: 16553ms, 818 MB / 2.48 GB
load modules: 495723ms, 4.84 GB / 2.48 GB
generate ast: 867ms, 613 kB / 2.48 GB
analyse ast: 8025ms, 718 MB / 2.48 GB
analyse dependency graph: 2048ms, 133 MB / 2.61 GB
mark included statements: 287ms, 1.74 MB / 2.61 GB
generate chunks: 23ms, 4.52 MB / 2.62 GB
GENERATE: 10654ms, -604 MB / 2.01 GB
render modules: 8269ms, 214 MB / 3.15 GB
render format: 125ms, 52.7 MB / 3.75 GB
Any help or pointers ? Do I need to do something more here ?
The text was updated successfully, but these errors were encountered: