Repository navigation
Speed up browser journal replay - #309
Merged
Merged
Conversation
Owner
Author
|
cursor review |
|
Skipping Bugbot: Bugbot is disabled for this repository. Visit the Bugbot dashboard to update your settings. |
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.
Why
Find and fix serious browser-extension performance costs without weakening browser behavior or journal safety. Large sessions currently reparse selected browser records through the streaming tokenizer even when those records qualify for the existing bounded native path.
Summary
docs/PERFORMANCE.md.Measurement
On macOS arm64 with Node 24.22.2, three interleaved baseline/candidate/candidate/baseline blocks ran against copies of two real journals. Each revision had six independent runs with 15 warm replay samples each. Pooled warm replay medians were 263.20 → 166.09 ms for a 114 MB journal (2,179 projected entries) and 152.05 → 119.64 ms for a 153 MB journal (1,813 entries). Output digests matched on every run. Host load varied, and cold measurements were inconclusive; this is replay work only, not an end-to-end Pi startup or browser-call speedup.
Verification
npm run verify -- pre-prwith Node 24.22.2, npm 12.2.0, Go 1.27.1 and isolatedagent-browser0.39.2: passed build, strict quality policy and lint, formatting, typecheck, generated docs, live command reference, package verification, and both test stages (1,511 passed / 49 skipped; 66 passed / 9 skipped).node --max-old-space-size=128 test/helpers/large-browser-journal.mjs: passed with a 1,614,664,908-byte journal, including a string over Node's string ceiling, 34,683 refs and three branches. Actual V8 heap limit was 335,544,320 bytes and peak RSS 363,008 KiB; the old-space flag is not a total-memory limit.ERROR. As a separate fallback, the current Cursor CLI reviewed the supplied complete diff and surrounding code in sandboxed read-only Ask mode and reported no defects; that review was static and ran no tests. No repository settings were changed.