-
-
Notifications
You must be signed in to change notification settings - Fork 234
perf: not render popup on init #554
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: antd-v5
Are you sure you want to change the base?
Conversation
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing Touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
package.json
Outdated
@@ -1,6 +1,6 @@ | |||
{ | |||
"name": "@rc-component/trigger", | |||
"version": "2.2.7", | |||
"version": "2.2.8", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
版本号不用改,另外把 test case 也搬过来
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已更新
初始化的时候,在不需要完全加载Popup的情况下,不加载Popup,以减少初始render所需要的时间。
这个更新已经在3.x里已经有了,但是在2.x里没有,所以加过来。
PS:3.x只用于antd的next分支及6.0的版本,2.x用于antd 5.x,当前antd6处于alpha1版本,我在5.x上遇到了这个性能问题
参考:
ant-design/ant-design#53844
052b2ae
本地测试的情况:
机器:Mac M4 Pro 24G
测试方法:某个组件内包含Tooltip 150个,计算渲染时间
结果:
chrome 默认速度:4.5ms -> 3.2ms
chrome 6x slowdown:29ms -> 22ms
整体提升约25%