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

Add function to cleanup wasm memory #1097

Closed
styfle opened this issue Jul 10, 2021 · 2 comments
Closed

Add function to cleanup wasm memory #1097

styfle opened this issue Jul 10, 2021 · 2 comments

Comments

@styfle
Copy link
Contributor

styfle commented Jul 10, 2021

We found that Next.js had a memory leak when pooling squoosh workers.

This was patched in vercel/next.js#23565 with this:

export function cleanup() {
  wasm = null
  cachegetUint8ClampedMemory0 = null
  cachegetUint8Memory0 = null
  cachegetInt32Memory0 = null
}

Then cleanup would be called in codecs.ts.

Any interest in adding this patch to @squoosh/lib?

@surma
Copy link
Collaborator

surma commented Jul 19, 2021

Interesting! Definitely interested in patching the leaks. While this is not an ideal solution, it’s better than leaving the leaks. So happy to accept an PR for this, although we should open a separate issue to investigate where we are leaking at some point.

@jakearchibald
Copy link
Collaborator

Unfortunately, due to a few people leaving the team, and staffing issues resulting from the current economic climate (ugh), the CLI and libsquoosh packages are no longer actively maintained. I know that sucks, but there simply isn't the time & people to work on this. If anyone from the community wants to fork it, you have my blessing. The squoosh.app web app will continue to be supported and improved.

@jakearchibald jakearchibald closed this as not planned Won't fix, can't repro, duplicate, stale Jan 3, 2023
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

3 participants