Repository navigation
Time frames in a browser, and say how a host moves a departed person's proposals - #37
Merged
Merged
Conversation
…s proposals The canvas renderer and the 1,000-node switch had only been timed in Node, which says nothing about painting or dropped frames. A benchmark page in the playground now pans, zooms and scrolls made-up trees as SVG and on the canvas and times every frame, and a script runs it in headless Chrome and writes docs/benchmarks-browser.md. First numbers, from one machine with other work running: the canvas held 60 frames a second at every size up to 19,999 nodes, also with the main thread slowed 4 times; SVG held it through 1,999 nodes, and through 499 on the slowed thread. The switch stays at 1,000. The README says what that means for slow devices and what wasn't measured. Separately, a host asked how to move a departed person's accepted proposals to another account. Payload refuses any change to author and decidedBy, and that stays. The README now says the lock is a hook, so a host makes the move in its own database code, changing only those two fields. A new test makes that move and checks the proposal and the snapshot made from it still verify. An option to allow the move through Payload was considered and not built; ADR 0012 says why. Not tested: the benchmark page and script have no tests of their own. Nothing was measured in WebKit, Firefox, a window on a real screen or a real slow device. The new plugin test runs on MongoDB only. Co-Authored-By: Claude <noreply@anthropic.com>
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.
Browser benchmark
The canvas renderer and the 1,000-node switch had only been timed in Node, which says nothing about painting or dropped frames.
apps/playground/bench.html(built with the playground) pans, zooms and scrolls made-up trees of 125 to 10,000 tips, as SVG and on the canvas, and times every frame. It runs in any browser: press Run, then save the numbers.node scripts/bench-browser.mjsruns it in the Chrome already installed, headless, at pixel density 1 and 2 and with the main thread slowed 4 times, and writesdocs/benchmarks-browser.md.--from <file>adds a section from numbers saved in another browser. It uses a throwaway profile that it deletes, listens on this machine only and sends nothing anywhere.First numbers (headless Chrome 157, M2 Max, other work running, one run of each):
The switch stays at 1,000 drawn nodes. The React README says it has room to spare on a fast machine, is a little high for a slow one, and suggests trying
canvasThreshold={500}there.Moving a departed person's proposals
A host asked how to move a departed person's accepted proposals to another account. Payload refuses any change to
authoranddecidedBy, and that stays. The plugin README now says the lock is a hook, so a host makes the move in its own database code, changes only those two fields, and leavesproposal,checksumand the snapshot alone. A new test makes that move on MongoDB and checks that the proposal still matches its checksum, the version made from it still verifies, and the proposal stays locked. No plugin code changed. An option to allow the move through Payload was considered and not built; ADR 0012 says why.Tested
pnpm build,pnpm typecheck,pnpm test(527 tests, one new), the leak check and the OneOrigin check pass locally.Not tested
docs/test-audit.mdsays why).🤖 Generated with Claude Code