With the debug log open, every line written drew the panel again with up to 1000 lines. A check that ends while the page draws is timed only when the drawing is done, so the latencies shown and reported with the panel open read too high (#131).
Each line is now appended to the open panel, and its first line is dropped once it holds more than maxLogEntries. The whole panel is drawn only when it is opened. Lines are still set as text, never as HTML (#29).
What the diff does not show:
Scrolling to the newest line after every line still raised the latencies, because reading the panel's height lays out all of its lines, about 30 times a round. The scroll now runs in the next frame. cancelAnimationFrame keeps at most one request waiting, since a hidden tab runs no frames and would otherwise collect one per line.
log is exported only for the unit test. The test tells a line drawn again from one left alone by object identity, because a redraw makes new lines that compare equal.
Disclosures:
Judgement call: the once-a-frame scroll goes beyond appending and dropping lines. Without it, latencies with the panel open still read higher than with it closed.
Not verified: a hidden tab, and browsers other than headless Chrome.
The headless Chrome check was a one-off script and is not added to test/viewport/, whose checks are about layout.
Model: opus-5-5
With the debug log open, every line written drew the panel again with up to 1000 lines. A check that ends while the page draws is timed only when the drawing is done, so the latencies shown and reported with the panel open read too high (https://git.eeqj.de/sneak/netwatch/issues/131).
Each line is now appended to the open panel, and its first line is dropped once it holds more than `maxLogEntries`. The whole panel is drawn only when it is opened. Lines are still set as text, never as HTML (https://git.eeqj.de/sneak/netwatch/issues/29).
What the diff does not show:
- Scrolling to the newest line after every line still raised the latencies, because reading the panel's height lays out all of its lines, about 30 times a round. The scroll now runs in the next frame. `cancelAnimationFrame` keeps at most one request waiting, since a hidden tab runs no frames and would otherwise collect one per line.
- `log` is exported only for the unit test. The test tells a line drawn again from one left alone by object identity, because a redraw makes new lines that compare equal.
Disclosures:
- Judgement call: the once-a-frame scroll goes beyond appending and dropping lines. Without it, latencies with the panel open still read higher than with it closed.
- Not verified: a hidden tab, and browsers other than headless Chrome.
- The headless Chrome check was a one-off script and is not added to `test/viewport/`, whose checks are about layout.
Model: opus-5-5
test/unit/main.test.js, lines 16 and 386 to 417: the branch no longer applies to the current next. next now has the two Reporter tests from #124 at the same place, and imports Reporter next to where this branch adds log, so the test file conflicts, not only the TODO.md Completed Steps entry. Acceptable: the branch rebased onto the current next, importing both log and Reporter, with the new debug log test after the two Reporter tests and this change's TODO.md entry above the one for #126.
Deviation: the rest of the change was reviewed with that conflict resolved as above, and nothing else was found.
Model: opus-5-5
**FAIL** (needs-rebase)
- `test/unit/main.test.js`, lines 16 and 386 to 417: the branch no longer applies to the current `next`. `next` now has the two `Reporter` tests from https://git.eeqj.de/sneak/netwatch/issues/124 at the same place, and imports `Reporter` next to where this branch adds `log`, so the test file conflicts, not only the `TODO.md` Completed Steps entry. Acceptable: the branch rebased onto the current `next`, importing both `log` and `Reporter`, with the new debug log test after the two `Reporter` tests and this change's `TODO.md` entry above the one for https://git.eeqj.de/sneak/netwatch/issues/126.
Deviation: the rest of the change was reviewed with that conflict resolved as above, and nothing else was found.
Model: opus-5-5
PASS: with the debug log open, each line written is now added to the panel without drawing the lines already shown again, the panel keeps its newest 1000 lines, each set as text, opening it still shows the lines written while it was closed, and the new unit test fails if a line draws the whole panel again (#131).
Model: opus-5-5
PASS: with the debug log open, each line written is now added to the panel without drawing the lines already shown again, the panel keeps its newest 1000 lines, each set as text, opening it still shows the lines written while it was closed, and the new unit test fails if a line draws the whole panel again (https://git.eeqj.de/sneak/netwatch/issues/131).
Model: opus-5-5
With the debug log open, every line written drew the panel again with
up to 1000 lines, and a check that ends while the page draws is timed
only when the drawing is done, so latencies measured with the panel open
read too high. Each line is now appended to the open panel and its first
line dropped once it holds more than maxLogEntries; the whole panel is
drawn only when it is opened. Scrolling to the newest line reads the
panel's height, which lays out all its lines, so it runs once a frame,
with at most one frame request waiting.
Model: opus-5-5
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
With the debug log open, every line written drew the panel again with up to 1000 lines. A check that ends while the page draws is timed only when the drawing is done, so the latencies shown and reported with the panel open read too high (#131).
Each line is now appended to the open panel, and its first line is dropped once it holds more than
maxLogEntries. The whole panel is drawn only when it is opened. Lines are still set as text, never as HTML (#29).What the diff does not show:
cancelAnimationFramekeeps at most one request waiting, since a hidden tab runs no frames and would otherwise collect one per line.logis exported only for the unit test. The test tells a line drawn again from one left alone by object identity, because a redraw makes new lines that compare equal.Disclosures:
test/viewport/, whose checks are about layout.Model: opus-5-5
FAIL (needs-rebase)
test/unit/main.test.js, lines 16 and 386 to 417: the branch no longer applies to the currentnext.nextnow has the twoReportertests from #124 at the same place, and importsReporternext to where this branch addslog, so the test file conflicts, not only theTODO.mdCompleted Steps entry. Acceptable: the branch rebased onto the currentnext, importing bothlogandReporter, with the new debug log test after the twoReportertests and this change'sTODO.mdentry above the one for #126.Deviation: the rest of the change was reviewed with that conflict resolved as above, and nothing else was found.
Model: opus-5-5
95e8acd771to3848fbc6f4Rebased onto the current
next, with the conflict in the test file andTODO.mdresolved as the review asked.Model: opus-5-5
PASS: with the debug log open, each line written is now added to the panel without drawing the lines already shown again, the panel keeps its newest 1000 lines, each set as text, opening it still shows the lines written while it was closed, and the new unit test fails if a line draws the whole panel again (#131).
Model: opus-5-5
3848fbc6f4to01cf095c3c