interledger-deprecated / ilp-plugin-bells

ILP Ledger plugin for five-bells-ledger
Other
4 stars 8 forks source link

Reduce dependency size #80

Open emschwartz opened 7 years ago

emschwartz commented 7 years ago

Reducing the dependency size would make it more reasonable to include ilp-plugin-bells by default in libraries like ilp.

According to cost-of-modules, we could dramatically reduce the size by using the broken out lodash packages that we need and switching from co-request to superagent (which is 1.13 Mb instead of 4.42):

┌────────────────┬─────────────┬───────┐
│ name           │ children    │ size  │
├────────────────┼─────────────┼───────┤
│ lodash         │ 0           │ 4.84M │
├────────────────┼─────────────┼───────┤
│ co-request     │ 63          │ 4.42M │
├────────────────┼─────────────┼───────┤
│ ws             │ 2           │ 0.21M │
├────────────────┼─────────────┼───────┤
│ reconnect-core │ 2           │ 0.17M │
├────────────────┼─────────────┼───────┤
│ debug          │ 1           │ 0.09M │
├────────────────┼─────────────┼───────┤
│ path-to-regexp │ 1           │ 0.06M │
├────────────────┼─────────────┼───────┤
│ eventemitter2  │ 0           │ 0.05M │
├────────────────┼─────────────┼───────┤
│ co             │ 0           │ 0.03M │
├────────────────┼─────────────┼───────┤
│ 8 modules      │ 66 children │ 9.79M │
└────────────────┴─────────────┴───────┘