-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Description
Describe the bug
I've observed following in my project.
I've already seen very similar image, when reported a memory leak, which was fixed by Dominic in #13563.
Here it does not seems to be a leak, because the amount of detached nodes isn't growing as time goes. But it seems like something within the signal graph is kept with them and might affect performance by being recalculated needlessly.
Reproduction
I was not able to reproduce it exactly yet, but still have some similarities in what I've found.
Here is the REPL with the code.
- Record memory snapshot
- Click button twice
- Repeat 1-2 until you have 5 snapshots
- Filter snapshots with "react"
Notice how amount of things in memory is growing. It does not seem to be leak exactly, because it does not grow past this point, but it feels like something is not cleaned up properly. Also I am wondering if these things being kept in memory affect performance anyhow by still being checked on signal graph updates. Maybe in the bigger codebase amount of such leftovers could be more significant?
Logs
No response
System Info
Chrome 131.0.6778.205Severity
annoyance