ant-design / ant-design-mobile

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

refactor: replace lodash/isEqual with react-fast-compare #6526

Closed guoyunhe closed 8 months ago

guoyunhe commented 8 months ago

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

    lodash/isEqual: Bundle size is 16.4 kB -> 6.4 kB (gzip)
react-fast-compare: Bundle size is 2.34 kB -> 925 B (gzip)

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

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

图片

数据来源 https://www.npmjs.com/package/react-fast-compare

相比 lodash/isEqual, react-fast-compare 在体积和性能上都更有优势。

codecov[bot] commented 8 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 (08d4af8) 92.27%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #6526 +/- ## ======================================= Coverage 92.27% 92.27% ======================================= Files 316 316 Lines 6897 6897 Branches 1728 1728 ======================================= Hits 6364 6364 Misses 497 497 Partials 36 36 ```

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