Skip to content
This repository has been archived by the owner on Dec 5, 2019. It is now read-only.

fix(index): reduce memory consumption (cacheKey.hash) #215

Merged
merged 1 commit into from
Jan 29, 2018

Conversation

alexander-akait
Copy link
Member

@alexander-akait alexander-akait commented Jan 27, 2018

Copy link
Member

@michael-ciniawsky michael-ciniawsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick && Questions

src/index.js Outdated
@@ -160,7 +161,7 @@ class UglifyJsPlugin {
'uglifyjs-webpack-plugin': versions.plugin,
'uglifyjs-webpack-plugin-options': this.options,
path: compiler.outputPath ? `${compiler.outputPath}/${file}` : file,
input,
inputHash: crypto.createHash('sha512').update(input).digest('hex'),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

inputHash => hash

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What other algos besides sha512 are available? (the shortest possible should be the way to go imho)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we serialize the options separately and hash them aswell ?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

webpack appears to use md5 for other modules - probably for speed.

Should we serialize the options separately and hash them aswell ?

Although the options could also be hashed, it may be easier to debug with a plain text prefix. A case could be made for either way.

@michael-ciniawsky michael-ciniawsky changed the title fix: reduced memory consumption fix(index): reduce memory consumption (cacheKey.hash) Jan 27, 2018
@michael-ciniawsky
Copy link
Member

#214 landed

@tschaub
Copy link

tschaub commented Jan 28, 2018

Thanks @evilebottnawi. I have confirmed that this fixes the issue described in #216.

@alexander-akait
Copy link
Member Author

@michael-ciniawsky friendly ping, change to md5

Copy link
Member

@michael-ciniawsky michael-ciniawsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

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

Successfully merging this pull request may close these issues.

4 participants