Skip to content
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

Clean up host pointers in level 2 of clean-up flag #21112

Merged
merged 1 commit into from
Mar 27, 2021

Commits on Mar 26, 2021

  1. Clean up host pointers in level 2 of clean-up flag

    The host tree is a cyclical structure. Leaking a single DOM node can
    retain a large amount of memory. React-managed DOM nodes also point
    back to a fiber tree.
    
    Perf testing suggests that disconnecting these fields has a big memory
    impact. That suggests leaks in non-React code but since it's hard to
    completely eliminate those, it may still be worth the extra work to
    clear these fields.
    
    I'm moving this to level 2 to confirm whether this alone is responsible
    for the memory savings, or if there are other fields that are retaining
    large amounts of memory.
    
    In our plan for removing the alternate model, DOM nodes would not be
    connected to fibers, except at the root of the whole tree, which is
    easy to disconnect on deletion. So in that world, we likely won't have
    to do any additional work.
    acdlite committed Mar 26, 2021
    Configuration menu
    Copy the full SHA
    61a9a56 View commit details
    Browse the repository at this point in the history