Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Leak from magics usage #2847

Closed
byronanderson opened this issue Apr 18, 2022 Discussed in #2846 · 0 comments
Closed

Leak from magics usage #2847

byronanderson opened this issue Apr 18, 2022 Discussed in #2846 · 0 comments

Comments

@byronanderson
Copy link
Contributor

High frequency evaluations of alpine strings that use magics (requestAnimationFrame usage in our case) exacerbate a leak we have found.

What we observe is that _x_cleanups will grow by 1 every time you use a magic property in an evaluated string, which will eventually cause our web page to crash running out of memory.

Here is a minimal reproduction of the issue: https://codesandbox.io/s/alpine-memory-broken-mlip56?file=/index.html

Resize the preview window on that page and you should see that _x_cleanups for the div with id "leaky" grows.

This other issue appears to be unrelated since incorporating the patch from his branch doesn't alleviate the leak we are experiencing.

@alpinejs alpinejs locked and limited conversation to collaborators Nov 24, 2022
@joshhanley joshhanley converted this issue into discussion #3289 Nov 24, 2022

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant