ant-design / ant-design-mobile

Essential UI blocks for building mobile web apps.
https://mobile.ant.design
MIT License
11.51k stars 2.38k forks source link

替换 lodash/memoize 为 nano-memoize #6524

Closed guoyunhe closed 5 months ago

guoyunhe commented 5 months ago

打包体积比较(越小越好)

lodash/memoize: Bundle size is 6.58 kB -> 2.67 kB (gzip) 
  nano-memoize: Bundle size is 1.12 kB -> 505 B (gzip)

数据来源 https://bundlejs.com/

性能比较(ops/sec越多越好)

lodash/memoize:  54,617,110 ops/sec
  nano-memoize: 177,773,071 ops/sec

数据来源 https://github.com/anywhichway/nano-memoize#benchmarks

相比 lodash/memoize, nano-memoize 在体积和性能上都更有优势。

github-actions[bot] commented 5 months ago

PR preview has been successfully built and deployed to https://antd-mobile-preview-pr-6524.surge.sh

codecov[bot] commented 5 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (b431a18) 92.27% compared to head (110addb) 92.29%. Report is 2 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #6524 +/- ## ========================================== + Coverage 92.27% 92.29% +0.01% ========================================== Files 316 317 +1 Lines 6897 6901 +4 Branches 1728 1728 ========================================== + Hits 6364 6369 +5 + Misses 497 496 -1 Partials 36 36 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.