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

Leakish behavior of something in signal graph which might cause performance degradation #14818

Open
gyzerok opened this issue Dec 24, 2024 · 1 comment

Comments

@gyzerok
Copy link

gyzerok commented Dec 24, 2024

Describe the bug

I've observed following in my project.

image

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.

  1. Record memory snapshot
  2. Click button twice
  3. Repeat 1-2 until you have 5 snapshots
  4. Filter snapshots with "react"
image image image

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.205

Severity

annoyance

@gyzerok
Copy link
Author

gyzerok commented Dec 29, 2024

Wondering if #14846 might be connected to my original issue. Will check with the version, that fixes it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant