orbit icon indicating copy to clipboard operation
orbit copied to clipboard

Ship Electron build with smaller disk footprint

Open haadcode opened this issue 7 years ago • 0 comments

Currently the electron build is ~300MB! :O

There's various reasons for that, but looking at some of the biggest disk space consumers:

libp2p-* ~40MB wrtc 11MB typescript 21MB ipld-resolver 5MB ipfs-daemon 8MB core-js 6.6MB ipfs-api 5.8MB

And in total the node.js dependencies in node_modules are ~200MB. Crazy.

The build process calls npm install --prodution to exclude all dev dependencies, but obviously that still pulls in a lot of unnecessary files.

We should reduce the disk footprint as much as possible.

Two options as of today:

  • Fix and minimize dependencies (eg. typeascript should not be a production dependency, pulled in by webcrypto-core)
  • Ship Orbit Electron version only with a bundled, minified distribution build, ie. the browser version (which can detect by itself whether it's running in Electron or browser)

Would love to hear about other options, strategies and tools we can use to get rid of megabytes of extra and slimming the Orbit Electron build as much as possible.

haadcode avatar Dec 16 '16 13:12 haadcode