Repository navigation
Conversation
Contributor
Changeset review
|
| @@ -0,0 +1,7 @@ | |||
| --- | |||
Contributor
There was a problem hiding this comment.
Changeset review
- warning: Changeset package scope does not match the affected packages confidently.
- warning: Changeset is not sufficiently consumer-focused.
- warning: Changeset contains unsupported consumer-facing claims.
commit: |
|
Size Increased — +2.3 KB 130.4 KB unpacked |
cowboyd
force-pushed
the
spike/frame-ownership
branch
2 times, most recently
from
October 27, 2026 15:15
ec55feb to
dd5d958
Compare
cowboyd
force-pushed
the
spike/frame-ownership
branch
from
October 27, 2026 15:30
dd5d958 to
201083e
Compare
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.
What does this PR do?
Lays the groundwork re-using element renders from previous frames. What this does is split the architecture into two separate frames, the current frame and the previous frame. This also fixes stale bounds for removed elements and caret cursors remaining visible after a resize. What it allows us to do is to "look back" at previous renders and just byte-copy entire rendered descriptions of elements.
There is already a bunch of "look back" happening already such as what the caret and the pointer were doing in the previous frame, so this just make a lot of that explicit.
Details
FrameContextowns the two frames, their current/previous roles, and the shared open-element stack and output buffer.Rendering prepares the runlist, executes layout, resolves metadata and pointer hits, draws cells, emits differences, then swaps the frames. Bounds remain lazy. Resize rebuilds viewport storage while retaining directive bytes and emitted state.
This does almost double the amount of memory used because we store two runlists instead of one so that we can crib off the previous runlets. However, this is because we preallocate the entire maximum runlets size for the maximum number of elements. We could grow this memory according to usage, but that would be a separate change.
Type of change
Checklist
deno task test: 29 suites, 400 steps)deno task fmt)Also checked the WASM build,
deno task verify,deno lint, and targeted nativechecks for rejected-input preservation, resize and capacity recovery, and
allocation boundaries.
AI-generated code disclosure