Skip to content

Bundling is too slow for development #2716

@ashubham

Description

@ashubham
  • Rollup Version: 1.1.2
  • Operating System (or Browser): Mac OS
  • Node Version: 10.11.0

How Do We Reproduce?

My Rollup config looks like this:

let plugins = [
    resolve({
        jsnext: true,
        browser: true
    }),
    commonjs(),
    includePaths({
        paths: ['app/.tmp/ts-out']
    }),
    json({
        compact: true
    })
];

const input = [
    'app/.tmp/ts-out/src/base/app.js'
];

export default [{
    input: input,
    treeshake: false,
    output: {
        dir: 'target/module',
        format: 'es',
        sourcemap: false
    },
    perf: true,
    plugins: plugins
}];

I run the rollup bundler using this command:

NODE_OPTIONS=--max_old_space_size=4096 ./node_modules/.bin/rollup -w -c app.rollup.config.js

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

  • plugin 0 (node-resolve) - resolveId: 13ms, 297 kB / 2.24 GB
  • plugin 0 (node-resolve) - resolveId (async): 113222ms, 3.76 GB / 2.48 GB
  • plugin 1 (commonjs) - resolveId: 2ms, 3.42 kB / 2.48 GB
  • plugin 1 (commonjs) - resolveId (async): 9ms, 504 kB / 2.48 GB
    load modules: 495723ms, 4.84 GB / 2.48 GB
  • plugin 1 (commonjs) - load: 952ms, 478 kB / 2.48 GB
    generate ast: 867ms, 613 kB / 2.48 GB
    analyse ast: 8025ms, 718 MB / 2.48 GB
  • plugin 1 (commonjs) - transform: 1ms, 2.06 kB / 1.76 GB
  • plugin 1 (commonjs) - transform (async): 265ms, 1.22 MB / 1.76 GB
  • plugin 1 (commonjs) - load (async): 2066ms, 6.05 MB / 2.47 GB
  • plugin 3 (json) - transform: 1ms, 240 B / 1.77 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 ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions