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

Memory leak in fragments #558

Closed
Inviz opened this issue Oct 29, 2024 · 1 comment · Fixed by #559
Closed

Memory leak in fragments #558

Inviz opened this issue Oct 29, 2024 · 1 comment · Fixed by #559

Comments

@Inviz
Copy link

Inviz commented Oct 29, 2024

Hello.

createElement(Fragment) permanently puts an entry into vnodesForComponent, which then never gets cleaned up. Further diffing becomes slower, as a hook will try to iterate all entries. The app gets slow.

@Inviz
Copy link
Author

Inviz commented Oct 29, 2024

@JoviDeCroock mentioned:

Skipping built-in's here would fix that https://github.com/preactjs/prefresh/blob/main/packages/core/src/runtime/vnode.js#L15

I think it's reasonable way to approach 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

Successfully merging a pull request may close this issue.

1 participant