Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi @thasophearak,
Thanks for using wasm-vips, I think you're the first to use it in combination with Cloudflare Workers!
I noticed your Tweet, and took a quick look at how wasm-vips was used. This PR improves a few things:
delete()
on every image instance that is returned from wasm-vips (see Unexplained "Aborted(OOM)" after processing 100+ images kleisauke/wasm-vips#13 (comment)).Uint8Array
copy; the resulting byte array is no longer backed by WebAssembly memory (see kleisauke/wasm-vips@185bdc8).BTW, were there any modifications needed to run this on Cloudflare Workers? I remembered that there was an execution time and a file size limit (see e.g. kleisauke/wasm-vips#2), but perhaps that's no longer an issue.