Repository navigation
Cut three of the slowest browser tests' cost, and the write watch's on long lists - #3294
Merged
Merged
Conversation
…n long lists Three of the push run's slowest browser tests spent their time on setup rather than on what they check. CPU below is user+sys for one local run of the single test, Chromium included, at a load near 11 on 18 cores. - `test_a_script_scroll_as_content_grows_above_ends_the_hold` (59-67 s on CI) opened the feature gallery to read one section. It now reads a synthetic `#read` section, the page `test_a_page_that_never_settles_lets_the_held_place_go_after_a_while` already built, which the two now share. 31.3 to 4.9 CPU-s. Coverage is unchanged: turning the ambiguous move into layout's forever (`movedAway`'s last line) fails both tests, and leaving the settling window open until its one-second limit (`watchHolds`'s settled check) fails this one alone. - `test_unchanged_margin_passes_over_the_corpus_do_bounded_work_and_write_nothing` (85-93 s on CI) opened `corpus.html` for readings that take about 8 s. The three readings now open `test_the_layer_holds_its_whole_page_rules_on_the_corpus`, the nightly test that opens the corpus already, at the same 1440px. The push run saves 36.6 CPU-s, and the nightly, which ran both, 34. Behavior coverage moves from each push to main to the daily run: a margin pass whose work grows with the corpus's rows, or that restates a margin name, is now caught within a day rather than on the push. Each reading runs as a subtest, so one that fails leaves the corpus's later readings to report. `_refreshes_restate_no_margin_name` stays in `browser/margin/test_entries.py`, where the gallery's margin atlas reads it too. - `test_the_reference_runs_available_commands_and_explains_the_rest` (67 s on CI) spent most of each `search.fill` in `write_watch.js`: re-rendering the reference's 76-row table took 1.2 s under the watch and 0.02 s without it. The watch read every subtree at every child-list record of a batch, and serialized it whole. It now reads each subtree nothing in the batch wrote into once per batch, and reads a record's later list only when an earlier list of its length is waiting to match. A subtree the batch wrote into at any point still holds a written node, since a node taken out of it was taken out by a write to a node within it, so the result is the same. 13.8 to 7.9 CPU-s, and every test whose page re-renders a long list gains the same way. `test_child_list_restatements_are_judged_across_one_delivery` fails when the cache ignores written subtrees. Two corpus readings were red on main, and are repaired here because the moved readings run beside them: - Every `test_page_fixture_renders` case waited out the 120 s notice deadline and failed: since #3260 the leaf's peek shows while the pointer or the focus rests on the leaf, and `other_pages` leaves the focus there, so `left_alone` read the peek as a notice that never retired. `left_alone` now releases the focus and moves the pointer off before it waits, rather than leaving that to some of its callers, and `surface_findings` and `typed_box_findings` no longer release the focus themselves. The resize journey, which also starts with `left_alone`, now starts with the focus released rather than on the leaf, so it no longer shows the leaf keeping the focus through a resize. - `pressable_paper_findings` waited for a tab named "Command", which #3167 renamed to the example's title; it finds the tab by the panel it controls. `test_the_layer_holds_its_whole_page_rules_on_the_corpus` still fails on main and here on its aims reading: eight `lf-draft-action` buttons stand 26px tall under a finger. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
approved these changes
Oct 20, 2026
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.
Three of the push run's slowest browser tests spent their time on setup rather than on what they check. CPU below is user+sys for one local run of the single test, Chromium included, at a load near 11 on 18 cores.
test_a_script_scroll_as_content_grows_above_ends_the_hold(59-67 s on CI) opened the feature gallery to read one section. It now reads a synthetic#readsection, the pagetest_a_page_that_never_settles_lets_the_held_place_go_after_a_whilealready built, which the two now share. 31.3 to 4.9 CPU-s. Coverage is unchanged: turning the ambiguous move into layout's forever (movedAway's last line) fails both tests, and leaving the settling window open until its one-second limit (watchHolds's settled check) fails this one alone.test_unchanged_margin_passes_over_the_corpus_do_bounded_work_and_write_nothing(85-93 s on CI) openedcorpus.htmlfor readings that take about 8 s. The three readings now opentest_the_layer_holds_its_whole_page_rules_on_the_corpus, the nightly test that opens the corpus already, at the same 1440px. The push run saves 36.6 CPU-s, and the nightly, which ran both, 34. Behavior coverage moves from each push to main to the daily run: a margin pass whose work grows with the corpus's rows, or that restates a margin name, is now caught within a day rather than on the push. Each reading runs as a subtest, so one that fails leaves the corpus's later readings to report._refreshes_restate_no_margin_namestays inbrowser/margin/test_entries.py, where the gallery's margin atlas reads it too.test_the_reference_runs_available_commands_and_explains_the_rest(67 s on CI) spent most of eachsearch.fillinwrite_watch.js: re-rendering the reference's 76-row table took 1.2 s under the watch and 0.02 s without it. The watch read every subtree at every child-list record of a batch, and serialized it whole. It now reads each subtree nothing in the batch wrote into once per batch, and reads a record's later list only when an earlier list of its length is waiting to match. A subtree the batch wrote into at any point still holds a written node, since a node taken out of it was taken out by a write to a node within it, so the result is the same. 13.8 to 7.9 CPU-s, and every test whose page re-renders a long list gains the same way.test_child_list_restatements_are_judged_across_one_deliveryfails when the cache ignores written subtrees.Two corpus readings were red on main, and are repaired here because the moved readings run beside them:
test_page_fixture_renderscase waited out the 120 s notice deadline and failed: since Show the leaf's peek when pointing at the row's leaf or field #3260 the leaf's peek shows while the pointer or the focus rests on the leaf, andother_pagesleaves the focus there, soleft_aloneread the peek as a notice that never retired.left_alonenow releases the focus and moves the pointer off before it waits, rather than leaving that to some of its callers, andsurface_findingsandtyped_box_findingsno longer release the focus themselves. The resize journey, which also starts withleft_alone, now starts with the focus released rather than on the leaf, so it no longer shows the leaf keeping the focus through a resize.pressable_paper_findingswaited for a tab named "Command", which Discover corpus examples and use their authored titles #3167 renamed to the example's title; it finds the tab by the panel it controls.test_the_layer_holds_its_whole_page_rules_on_the_corpusstill fails on main and here on its aims reading: eightlf-draft-actionbuttons stand 26px tall under a finger.