Skip to content

Instantly share code, notes, and snippets.

@joshwiens
Last active November 29, 2017 11:46
Show Gist options
  • Save joshwiens/4040ad3b9688c0fcfb7086e85dd2c564 to your computer and use it in GitHub Desktop.
Save joshwiens/4040ad3b9688c0fcfb7086e85dd2c564 to your computer and use it in GitHub Desktop.
Possible webpack performance enhancements

Hashing

  • Convert all the crypto calls to md5 to a non-crypto library
    • Aggregate all crypto hash usages into util/createHash (webpack/webpack#6006).
    • Avoid calling hash.update with short strings (webpack/webpack#6006).
    • Add Node 8 only non-crypto webassembly hashing algorithm.

Module Concatination

  • Improve concatConfigurations algorithm
  • Thread module concat plugin
    • Implement NapaJS Zones.
    • Split the root & recursive portions of tryToAdd & thread the latter.
    • Lots & lots of performance testing. Threading this will increase the webpack memory footprint
  • Port the heavy lifting portion to rust compiled to wasm
    • Build & performance test a web assembly version of ModuleConcatenationPlugin.
    • Mono repo for all the Rust libs to maintain the webpack/webpack dev experience consistant?

Parsing

  • Create a Rust port of Acorn and .... compile to wasm?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment