ipfs-shipyard / ipfs-geoip

geoip lookup over DAG-CBOR dataset loaded from IPFS
MIT License
70 stars 21 forks source link

refactor: replace memoizee with p-memoize #77

Closed lidel closed 4 years ago

lidel commented 4 years ago

I noticed memoizee (20KB) and its dependencies was responsible for most of the size:

Screenshot_2020-09-01 ipfs-geoip 5 0 0 ❘ BundlePhobia

Screenshot_2020-09-01 BundlePhobia

This PR replaces it with p-memoize (3KB, less deps), which does the same thing but is smaller (is there a better one?):

2020-09-01--15-36-24

rafaelramalho19 commented 4 years ago

I believe it's the smallest, you can look at the "similar packages" section here: https://bundlephobia.com/result?p=p-memoize@4.0.0