Repository navigation
The window's memory: a picture decoded at the size its URL asks (raea-w, raea-h) - #184
Merged
Merged
Conversation
…-w, raea-h) A feed card drew a 2560x1440 still at 720 points at most, and raea's window held it decoded at full size: 14.7 MB of RGBA a still, and the window grew 25 MB for every still scrolled past (raea-feed e2e/memory.spec.ts: 1.1 GB open, 2.0 GB after 60 stills, 2.5 GB after opening a few). blitz-dom's image decode now fits a picture whose URL's query asks raea-w=N and/or raea-h=N to that box, its shape kept and never larger, area-averaged on premultiplied pixels when any is see-through. The servers ignore the query (the app's node server returned the same bytes; raea-page's file loads read url.path()), and so does a browser. The feed's cards ask theirs at the card's size.
…in's :has() clause and this lane's picture fit) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
shinyobjectz
added a commit
that referenced
this pull request
Nov 18, 2026
…he page's code handed over once raea's page host kept the last 240 frames' UI trees (tree.rs TREES) for the MCP ui tool. It did that in the person's app too, where the MCP server is off and nothing reads them: 315 MB of serde_json trees with a feed of 120 cards open, found by MallocStackLogging in raea-feed's e2e/memory.spec.ts (MEM_STACKS). - The trees are kept only once the MCP server serves (tree::KEEP, set by mcp::serve). LATEST, which BRP's ui method reads, is kept as before. - The frames the MCP reader was handed already (tree::SEEN) are let go: its next ask is always for a later frame. - Frames in a row whose trees are the same are kept once, with their first frame, and handed out as each frame. A page at rest is one tree however long it rests, and every reader gets what it got before. The page host's main also hands the page's code to the mount once instead of keeping it for the app's whole life: the feed's bundle is 21 to 26 MB. raea-feed's memory spec, 60 stills of 2560x1440, with raea #184 and raea-feed #97: | Stage | 0.1.8-rc3 | Now | |---|---|---| | Feed open | 1131 MB | 757 MB | | End of feed | 2032 MB | 904 MB | | After opening items | 2526 MB | 1317 MB | Unit tests (tree::tests) cover: - a run handed out frame by frame; - what was handed out let go; - a run part-way through kept; - the 240 cap.
shinyobjectz
added a commit
that referenced
this pull request
Nov 18, 2026
…he page's code handed over once raea's page host kept the last 240 frames' UI trees (tree.rs TREES) for the MCP ui tool. It did that in the person's app too, where the MCP server is off and nothing reads them: 315 MB of serde_json trees with a feed of 120 cards open, found by MallocStackLogging in raea-feed's e2e/memory.spec.ts (MEM_STACKS). - The trees are kept only once the MCP server serves (tree::KEEP, set by mcp::serve). LATEST, which BRP's ui method reads, is kept as before. - The frames the MCP reader was handed already (tree::SEEN) are let go: its next ask is always for a later frame. - Frames in a row whose trees are the same are kept once, with their first frame, and handed out as each frame. A page at rest is one tree however long it rests, and every reader gets what it got before. The page host's main also hands the page's code to the mount once instead of keeping it for the app's whole life: the feed's bundle is 21 to 26 MB. raea-feed's memory spec, 60 stills of 2560x1440, with raea #184 and raea-feed #97: | Stage | 0.1.8-rc3 | Now | |---|---|---| | Feed open | 1131 MB | 757 MB | | End of feed | 2032 MB | 904 MB | | After opening items | 2526 MB | 1317 MB | Unit tests (tree::tests) cover: - a run handed out frame by frame; - what was handed out let go; - a run part-way through kept; - the 240 cap.
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.
The problem. A feed card draws a still at most 720 points wide (1440 pixels on a Retina screen), but raea's window decoded it at full size. A 2560×1440 still held 14.7 MB of RGBA. Measured with raea-feed's new
e2e/memory.spec.ts(60 stills of 2560×1440, before this change):That's 25 MB for every still scrolled past, all of it heap.
The change. blitz-dom's image decode (both decoder paths in
net.rs) now fits a picture to the box its URL's query asks:raea-w=Nand/orraea-h=N.thumbnail), on premultiplied pixels when any pixel is see-through.url.path(). A browser ignores it too.The feed's cards ask for their pictures at the card's size in a raea-feed PR that goes with this one.
Tests. Unit test
a_picture_fits_the_size_its_url_asks: the asked width, the tighter of a width and a height, never upscaled, an unknown key ignored, and no colour bleeding from transparent pixels.🤖 Generated with Claude Code