-
Notifications
You must be signed in to change notification settings - Fork 12
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
Investigate performance/memory overhead of adding fields and mutator keys to Node #1096
Comments
After about an hour of testing we have some results to share! For startup time, we tested by adding a parallel loop in Next we timed the cumulative time on startup of the actual loop in mutate to see if doubling the number of mutators showed any difference in context. We did not see reproduceable differentiation (in ms): Next we created a loop that added 1000 extra Nodes in waves intro, and added them as children to the screen view, totaling 4513 in waves intro. The snapshot after startup without any additional Node properties defined was 58.1MB With 80 extra Node properties initialized to null, 60.0MB The math we then did was Maybe it should be 8 bytes per reference? In general, these results to us indicate that there is tolerance, and that adding this to Node is not a bottleneck to performance or memory. That said, we would love to have @jonathanolson review these findings and comment on the validity of the methods, results, and assumptions going forward. As it pertains directly to #1047, this makes us confident in adding two more Node fields and two more mutator keys (to support opacity in a consistent way with pickable). |
Those seem like definitely acceptable numbers, sounds good to me! |
@samreid and I have been adding constructor fields and mutator keys to Node for features implemented in #1046 and #1047. We feel like it is important to quantify performance/memory overhead to weigh certain tradeoffs in that issue.
For our purposes, we are most interested in:
mutate
call).The text was updated successfully, but these errors were encountered: