daostack / vanille

GNU General Public License v3.0
8 stars 2 forks source link

Bundles are way too big #15

Closed dkent600 closed 6 years ago

dkent600 commented 6 years ago

Building for production is creating huge bundles, "common" is 10M.

Preliminary findings about "common:":

1) 2M is due to using "npm link" to pull in arc-js 2) 7M is due to the contract json files (!) 3) the file is not being minified/uglified

Gotta fix this. Loading the app takes 2 minutes on Alon's and dev matan's machines.

dkent600 commented 6 years ago

Demo: Bundles are way too big

dkent600 commented 6 years ago

I've got them down about 70%, but there is still room for improvement. the "common" bundle is still over 900K.

  1. We can control in arc-js which contract .json files are packaged.
  2. It may be possible to improve the gzip algorithm currently being used by Azure.
  3. We may be able to get webpack to do some tree-pruning.
  4. make sure that everything that can be minified/uglified, is being minified/uglified.
  5. get webpack to do more lazy loading of bundles/chunks.
dkent600 commented 6 years ago

Calling this done for now. Can create another issue later if we want to do more such as is listed above.