Repository navigation
Conversation
The row expand viewer could blow up memory on rows with big JSON (e.g. resume_parsing's Buffer 'data' byte arrays / large jsonb): - Raw view: the preview kept every array item / object key (only strings were truncated), so displayText ballooned, then got stringified and highlighted. Now cap arrays/objects to 200 children in the preview and skip per-token highlighting entirely for any truncated/large value (plain escaped text). Copy JSON still copies the full value. - Tree view: stop materializing a tuple for every element of a huge array just to show its count — use .length for the summary and build only the currently-visible children.
|
This was referenced Jul 5, 2026
Collaborator
Author
|
Superseded by combined minor-release PR #36 (same changes, rolled up). Closing to keep a single merge. |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Fixes memory blowups when expanding a row whose JSON is very large (e.g.
resume_parsingrows — a Buffer serialized as adatabyte array of thousands of numbers, or largejsonb).Root cause
In the row expand viewer's Raw mode, the preview (
truncateDeep) truncated long strings but kept every array item and object key. So for a big byte array,displayTextballooned to the full size, then got JSON-stringified and (below the 12 KB limit) syntax-highlighted — building a span-per-token HTML string. That's the memory hog.Fix
RowExpandViewer.svelte(Raw view):… N more itemsmarker. Bounds the stringified size regardless of how big the value is.JsonTree.svelte(Tree view):[index, value]tuple for every element of a huge array just to show its count — use.lengthfor the summary and build only the currently-visible children (up to the page limit).Verification
npm run buildpasses. Applied live in a runningtauri devsession (HMR, no errors). Disjoint files from #20/#21/#22.