We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
3.8.2
all
对项目性能进行检测, 发现 setScale 居然成为性能热点之一. 查看源码发现, 3.8.x 里 不会 判断 设置的值和之前的值是否一样, 而是无脑更新 且会调用 invalidateChildren 深度遍历子节点. 以前 2.x 里 是会判断 新设置的值是否和之前不同.
建议 3.8 能加入类似机制.
No response
无
The text was updated successfully, but these errors were encountered:
确实没想到这里会成为热点。你的项目为什么会频繁设置相同的值呢?
Sorry, something went wrong.
和玩法有关, 游戏里 的物体就是会经常的不断的缩放. 当然我可以自己判断, 只是我以为 3和2 一样 内部会判断呢.
引擎内部是应该做判断的。我会提交修改。
minggo
No branches or pull requests
Cocos Creator version
3.8.2
System information
all
Issue description
对项目性能进行检测, 发现 setScale 居然成为性能热点之一.
查看源码发现, 3.8.x 里 不会 判断 设置的值和之前的值是否一样, 而是无脑更新 且会调用 invalidateChildren 深度遍历子节点.
以前 2.x 里 是会判断 新设置的值是否和之前不同.
建议 3.8 能加入类似机制.
Relevant error log output
No response
Steps to reproduce
无
Minimal reproduction project
No response
The text was updated successfully, but these errors were encountered: