You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While fixing the other issue yesterday, it got me thinking that trying to determine which font to use in each render might not be super efficient.
I decided to take a look at it from a performance perspective, here are my findings.
It appears that on an Oppo A72 Android device, it takes about 1ms to execute the logic in the overridden render function. Now, if there are 16 Text nodes on the screen, that's already 16 ms, so a dropped frame.
If however I add some memoization, it drops to 0.1ms most of the time, which is a 10x improvement:
I'll open a PR shortly with this for your consideration
The text was updated successfully, but these errors were encountered:
Hi again.
While fixing the other issue yesterday, it got me thinking that trying to determine which font to use in each render might not be super efficient.
I decided to take a look at it from a performance perspective, here are my findings.
It appears that on an Oppo A72 Android device, it takes about 1ms to execute the logic in the overridden render function. Now, if there are 16 Text nodes on the screen, that's already 16 ms, so a dropped frame.
If however I add some memoization, it drops to 0.1ms most of the time, which is a 10x improvement:I'll open a PR shortly with this for your considerationThe text was updated successfully, but these errors were encountered: