ant-design / antd-style

css-in-js library with antd v5 token system
https://ant-design.github.io/antd-style/
MIT License
189 stars 29 forks source link

antd-style是基于 emotion 二次封装的,我想知道antd-style会像@ant-design/cssinjs一样有更好的性能吗? #35

Closed wyl199 closed 1 year ago

wyl199 commented 1 year ago

antd-style会像@ant-design/cssinjs一样带来更好的性能吗

arvinxx commented 1 year ago

达不到cssinjs包这个水平,原因是cssinjs包在不支持响应props的设定下可以静态化,进而提升性能。但业务应用中需要使用props来动态响应样式,所以这一点是比不上的原因。

但 antd-style 的整体性能会比裸用emotion react 或者emotion css好。毛估估和 styled 应该差不多。具体还没做性能测试。

arvinxx commented 1 year ago

你可以体感对比一下antd-style的文档站点和antd 官网的站点。antd-style的文章站点样式就是自己吃狗粮,antd 官网的是用的emotion

arvinxx commented 1 year ago

实测下来,性能应该是在 CSSinJS 库的第一梯队

image
github-actions[bot] commented 1 year ago

:tada: This issue has been resolved in version 3.4.0-alpha.1 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

github-actions[bot] commented 1 year ago

:tada: This issue has been resolved in version 3.4.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: