-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
ASButtonNode and ASCollectionNode Performance #72
Comments
@QuynhNguyen This is quite unusual. Can you share a time profile or a sample project that we can check? Also, which version of Texture are you using? |
@nguyenhuy Will do. I am using the latest release which is 2.3 I believe. Will try to put together a sample project shortly. |
Try to scroll real fast down the bottom of the page. After that, uncomment the code I have and try again. |
@QuynhNguyen thanks for the great report! Indeed this is unusual, hopefully a member of the team has time to investigate in the next few days. Please do update this task if you take a time profile and notice what the difference in CPU time is from. |
How to reproduce:
How to fix:
Notes:
I am using
nodeBlockForItemAt
and layouting withlayoutSpecThatFit
. After debug further, I think it may not only related to ASButtonNode but other problems as well. For instance, the frame rate will drop if you are creating too much ASDisplayNode at run time then append it into the ASCollectionCellNode hierarchy. I have a for loop that is creating about 12 ASTextDisplayNode then add it into ASCollectionCellNode hierarchy at run time. However, for some odd reason, if I give a preferred size to the buttons then the issue would be resolved.It was working fine on 2.1 though.
Code:
The text was updated successfully, but these errors were encountered: