-
-
Notifications
You must be signed in to change notification settings - Fork 214
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
Node:getChildren()性能问题 #2068
Comments
Have you tried running the Time Profiler Instrument in Xcode to find out what section of code is causing the performance issue? |
I'm not sure what that LUA method does, but perhaps someone else with knowledge can help with this. A possibly work-around is if you keep track of the children outside of that scheduled method, you wouldn't need to call Also, which version of Cocos2d-x are you comparing Axmol to? v3.17, or v4? Other than that, I'm curious about this section of code (check the comment please):
Would this be better:
|
用于测试,写的有点不严谨
axmol lua 2.1.4 消耗了2.92s,用cocos2d lua 4.0版本消耗0.07s,这两个运行环境是一样但差距有点大呀,能力有限有没有大神看看哪里出问题了? |
#332, maybe GC 模式设置错误,请检查下 |
以前的项目修改了GC模式,现在项目迁移,没发现这个还能导致性能问题 |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
开多个计时器调用 Node:getChildren() 非常消耗性能,cocos2d没这么差,不知道啥原因,特来请教
试例代码如下:
程序满帧率被设置成60
运行上面代码帧率在50左右,注释掉 local _Children = _Node:getChildren() 帧率可以保持在60
有没有知道如何优化的
The text was updated successfully, but these errors were encountered: