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
When I run benchmark for processInactivityUpdates I found that there are too many closures retained
Most of them are from the hook when we get sub tree
Expected behavior
Since the hook is important to update the parent tree, I'd think if it's possible to create getSubTreeReadonly to avoid the hook? That should work for some use cases.
Find and avoid the below pattern to avoid accessing a property inside state too frequently
in the example above, we should get state.inactivityScores only 1 time and assign to a separate variable. How to reproduce
Run processInactivityUpdates benchmark
The text was updated successfully, but these errors were encountered:
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 15 days if no further activity occurs. Thank you for your contributions.
@tuyennhv Once we merge all the memory related improvements we should do another round of heap snapshots to validate the improvements. Then we can review this issues 👍
Describe the bug
When I run benchmark for
processInactivityUpdates
I found that there are too many closures retainedMost of them are from the hook when we get sub tree
Expected behavior
getSubTreeReadonly
to avoid the hook? That should work for some use cases.in the example above, we should get
state.inactivityScores
only 1 time and assign to a separate variable.How to reproduce
Run
processInactivityUpdates
benchmarkThe text was updated successfully, but these errors were encountered: