Repository navigation
Fix out-of-memory crash when uploading large HTML5 zips - #6382
Merged
Merged
Conversation
createPredictableZip spread every output byte into plain JS arrays, crashing the tab for ~100 MB zips. It now reads and compresses one file at a time and returns a Blob of the parts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013PjXpadkyTqqJqQ9TdWFSC
rtibbles
marked this pull request as ready for review
November 6, 2026 18:58
bjester
approved these changes
Nov 6, 2026
bjester
left a comment
Member
There was a problem hiding this comment.
I think I understand how this helps. I tested it and didn't get an OOM. I monitored the tab's memory and it went from 262k to 444k, which seems reasonable for the size of the ZIP.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Uploading a 103 MB HTML5 zip crashed the browser tab with an out-of-memory error while Studio re-zipped it before upload. Re-zipping now holds one uncompressed file at a time and builds the output without copying it byte by byte into JS arrays, so zips this size upload.
References
Reported: https://community.learningequality.org/t/out-of-memory-error-when-uploading-103-mb-html5-zip/4080
Reviewer guidance
AI usage
Used Claude Code to diagnose the crash, write the fix and tests, and run the upload end to end. Verified with the JS test suite and manual QA in a browser with the reporter's zip.
🤖 Generated with Claude Code
https://claude.ai/code/session_013PjXpadkyTqqJqQ9TdWFSC