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

Improve File hashing logic in bundler.js. #10050

Merged
merged 2 commits into from Jul 3, 2018

Conversation

benjamn
Copy link
Contributor

@benjamn benjamn commented Jul 3, 2018

Follow-up to #9933.

As recommended by @abernix, the sha1 hash of every file is now computed from the file's sha512 hash, so we don't have to hash the entire contents of the file twice with two different algorithms.

Other changes/improvements:

  • Invalidate the hashes when/if File#setContents is called.
  • Ignore options.hash and just compute hashes from actual file contents. Disagreement here would be worse than any performance benefits from precomputing the hash.

Follow-up to #9933.

As recommended by @abernix, the sha1 hash of every file is now computed
from the file's sha512 hash, so we don't have to hash the entire contents
of the file twice with two different algorithms.

Other changes/improvements:

* Invalidate the hashes when/if `File#setContents` is called.

* Ignore `options.hash` and just compute hashes from actual file contents.
  Disagreement here would be worse than any performance benefits from
  precomputing the hash.
@benjamn benjamn added this to the Release 1.7.1 milestone Jul 3, 2018
@benjamn benjamn self-assigned this Jul 3, 2018
@benjamn benjamn requested a review from abernix July 3, 2018 16:46
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

Successfully merging this pull request may close these issues.

None yet

2 participants