-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Reclaim element id for all removed nodes #3782
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
Conversation
@ealmloff can you give this a quick look? It's small and I think you'll easily be able to tell me if it's a step in the wrong direction. |
I think the |
@ealmloff I'm not explicitly using suspense boundaries anywhere. The If the |
Sorry it took so long to get back to you. Yes, I think that is correct there are three cases for
For We could add a separate "remove_from_dom" bool that is true just in case 3 or switch to a three variant enum |
I spent a few hours digging into this today and then spun out a branch that properly wires the "should_write" flag into the callsites: Suspense is a less-used feature and I'd rather have regular vdom code not leak than the extra logging in the suspense case. Seems like playwright and tests pass just fine even with suspense. What I think is happening is that our call to remove_nested_dyn_nodes passes a |
element ids associated with nodes removed via
fn remove_nested_dyn_nodes
are never reclaimed. This causes references to them to hang around, leading to unbounded growth of detached DOM nodes for applications that dynamically add and remove nodes frequentlyfixes #3760