Skip to content
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

Potential memory leak? #122

Open
rjgotten opened this issue Apr 17, 2020 · 0 comments
Open

Potential memory leak? #122

rjgotten opened this issue Apr 17, 2020 · 0 comments

Comments

@rjgotten
Copy link

I'm currently using wasm-brottli as part of a webpack build, i.e. basically:

const { compress : brotliCompress } = require( "wasm-brotli" );

// ( ... )

exports = () => {
  // ( ... )

  plugins : [
    new CompressionPlugin({
      test : /\.(js|css|json|svg)$/
      algorithm( input, options, callback ) {
        brotliCompress( input )
          .then( content => callback( null, content ))
          .catch( error => callback( error ));
      }
    })
  ]
};

I'm seeing an 800~900 MB increase in RAM usage on a build that otherwise rests at 450~500 MB and only has ~25 files going into the compression plugin. This does not seem normal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant