Skip to content

Plugin replace chugs a lot of memory #1064

@Rigo-m

Description

@Rigo-m

Expected Behavior

Plugin replace should not, hopefully, use 3 times as much heap as without them

Actual Behavior

Running node build.js without plugin replace logs these memory readings:

Using 6.72 MB before
Using 7.36 MB after rollup
Using 8.17 MB after write

When plugin replace is activated it logs these memory readings instead:

Using 7.17 MB before
Using 26.22 MB after rollup
Using 27.43 MB after write

This is almost 3 times the heap size used without the plugin.
This became an issue while bundling a nuxt nitro application in netlify, that has 6GB hard limit on RAM usage in build containers.

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