Skip to content

fix: prevent memory bloat in HWP binary image extraction - #4

Open
mrueg wants to merge 1 commit into
GS-AX:masterfrom
mrueg:fix/hwp-image-memory-bloat
Open

fix: prevent memory bloat in HWP binary image extraction#4
mrueg wants to merge 1 commit into
GS-AX:masterfrom
mrueg:fix/hwp-image-memory-bloat

Conversation

@mrueg

@mrueg mrueg commented Jul 13, 2026

Copy link
Copy Markdown

This PR fixes a performance/memory issue in HWP binary image extraction:

  • Slice ArrayBuffer: Saves a slice of the backing ArrayBuffer corresponding to the image's exact offset and length. Previously, the entire backing buffer (which holds the entire document file contents or parser data) was saved for each individual image, resulting in massive note/asset file size bloat.

Use Uint8Array.prototype.slice to extract the specific image bytes from the backing ArrayBuffer. Previously, the entire backing buffer for the document was saved for every individual image, causing major file size bloat.
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 this pull request may close these issues.

1 participant