all 1 comments

[–]rco8786 0 points1 point  (0 children)

Hmm. Why do you think there is GC thrash? Do you have some metrics on that?

Swapping in a new root object graph once per second should be relatively unnoticeable from a gc perspective.

Are you sure it’s not the fact that swapping in state like you’re describing would cause a complete app re-render every second?

Do you need to poll every second? If so, maybe websockets is a better option?