Skip to content

perf(web): refine Home navigation handoffs - #76

Closed
blurbery wants to merge 4 commits into
perf/cross-browser-home-navigationfrom
perf/home-navigation-followups
Closed

blurbery wants to merge 4 commits into
perf/cross-browser-home-navigationfrom
perf/home-navigation-followups

Conversation

@blurbery

@blurbery blurbery commented Aug 30, 2026 •

Copy link
Copy Markdown
Owner

Problem

Related issue: N/A — narrow follow-up to Silo-Server#834 maintainer review.

This draft contains only the three non-blocking navigation observations deliberately left out of Silo-Server#834:

  • make the 340 ms Home return token apply only to item→Home returns;
  • let the outgoing Home hero keep its Ken Burns transform through the existing opacity fade, then clean it up completely;
  • put a hard ceiling on deferred Home-row restoration so a large layout cannot take roughly 1.6 seconds or longer to become complete.

This remains a stacked draft. Its declared base is perf/cross-browser-home-navigation at f2d859e4, while head 73f836b0 explicitly merges exact Silo-Server#834 head c5968f90 for combined validation. It is not independently based on upstream main. After Silo-Server#834 merges, only the three refinement commits must be transplanted onto current upstream main and revalidated before opening the upstream PR.

Approach

  • Mark the exact Home→item→Home state-machine boundary and use that transient origin flag for the 340 ms return token. Direct Home loads and other Back navigations to Home keep the 300 ms default.
  • Keep one outgoing hero backdrop's Ken Burns animation through the existing 1000 ms opacity fade. will-change stays active-only, a new handoff replaces the previous outgoing slot, reduced motion retains nothing, and the cleanup timer is cleared on replacement or unmount.
  • Cap deferred Home-row fallback restoration at 900 ms. The existing 360 ms start, 70 ms stagger, IntersectionObserver fast path, eager-row budget, and transition gate remain unchanged.

No blur, page snapshot, unbounded cache, worker, background process, or retained hidden animation was added.

Validation

Focused regression coverage

Against Silo-Server#834 head f2d859e4, the implementation commit is 431f28c5; 50f1cf49 only fixes the test typing so the CI tsc -b build accepts the assertions. Combined head 73f836b0 then merges exact Silo-Server#834 head c5968f90, including its eager-row restoration and full thumbhash-fade acceptance fixes.

  • 155/155 focused tests passed across the 11 touched test files after integrating exact perf(web): smooth Home item navigation across browser engines Silo-Server/silo-server#834 head c5968f90.
  • Full TypeScript project build passed after the CI-only typing fix.
  • HeroBanner: 29/29 tests passed.
  • Touched-file Prettier passed; touched-file ESLint reported zero errors.
  • The state-machine regression runs 24 Home cycles: 12 same-item and 12 different-item entries. The return flag exists only for the immediate item→Home commit and clears on the next route.
  • The hero regression runs 24 rapid handoffs across 12 distinct slides. It permits exactly two inline Ken Burns animations during a crossfade, exactly one will-change-transform, and one animation after 1000 ms. Unmount leaves zero timers. Reduced motion retains no outgoing motion.
  • The 20-row restoration regression is incomplete at 899 ms and complete at 900 ms, with every placeholder removed.

Real headed browsers

These were real installed browsers, not user-agent spoofing or simulators:

  • Google Chrome 152.0.7977.65, driven through Chrome DevTools.
  • Firefox 154.0.1, driven by Mozilla geckodriver 0.37.1 with moz:headless=false and moz:windowless=false.
  • Safari 26.5.2, driven by Apple SafariDriver with safari:useSimulator=false.

Chrome and Firefox each ran 24 baseline and 24 after cycles at 1440 px: 12 repeated same-item cycles and 12 different-item cycles. Every completed run returned to a fully restored Home.

Check f2d859e4 baseline Follow-up
Direct Home duration 300 ms 300 ms
Item→Home duration 340 ms 340 ms, homeItemReturn=true
Library→Home duration 340 ms 300 ms
Chrome return frame p95 17.6–17.7 ms 17.6–17.7 ms
Chrome worst return gap 115.6 ms 116.4 ms
Firefox median return p95 16.94 ms 17.18 ms
Firefox worst return gap 66.66 ms 66.66 ms
Chrome restoration max 812.41 ms 813.16 ms
Firefox restoration max 1279.91 ms 1257.77 ms
Chrome CLS / return shifts 0 / 0 0 / 0
Critical DOM after cycles 7571 7571
Active animations after cycles 2 2

Firefox opening remained effectively unchanged as well: median per-run p95 was 17.08 ms before and after, with worst gaps of 66.66 ms and 66.68 ms. Chrome opening p95 stayed around one 60 Hz frame; isolated item-page DOM work still produced the same class of larger single gaps in both revisions.

Chrome exposed long tasks. Baseline return runs recorded 24 tasks, 1762 ms total, 111 ms maximum; the follow-up recorded 24 tasks, 1857 ms total, 114 ms maximum. That small increase is reported as noise rather than hidden: frame p95, CLS, visual motion, DOM completion, and retained animation counts did not regress. Firefox and Safari did not expose longtask or layout-shift through PerformanceObserver, so I am not reporting unsupported zeroes.

The Chrome GC-visible heap delta was +48,741,260 bytes before and +45,782,876 bytes after. DevTools' retained document/node counters moved from 6→7 and 23,309→32,009 before, versus 7→8 and 24,905→33,601 after. Those are run-scoped retention signals, not proof of a leak or an improvement; the critical live DOM returned to 7571 and active animations returned to two in both revisions. Firefox and Safari did not provide an equivalent trustworthy memory signal in this harness.

The live Home had 10 rows, so it did not engage the new 900 ms cap. The browser restoration numbers therefore stay essentially unchanged; the 20-row timer regression is the evidence for the cap itself.

For Safari, I discarded an early JavaScript-click harness that polled WebDriver every 20–40 ms during motion. It forced coarse 160–224 ms animation-frame sampling and visibly disrupted the page, so those numbers are not treated as product performance. Repeating the test through native W3C element clicks without transition-time polling restored the previously accepted Safari path. The final uninterrupted attempt completed seven smooth different-item Home→item→Home cycles before SafariDriver accepted a no-op duplicate Back target and stopped the harness; earlier corrected attempts also completed clean cycles. blurbery manually confirmed the corrected Safari run was “perfect” and “way smoother.” The Safari probes reported 7571 live DOM nodes, two active animations, and the 112×48 wordmark loaded. I am not fabricating a numerical Safari frame summary from the interrupted driver run.

blurbery also manually confirmed the completed Chrome and Firefox runs were smooth. Orion was not rerun for this follow-up because it has no equivalent automation driver in the connected tooling; no user-agent substitution is reported as an Orion result.

Risks and follow-up

AI Disclosure

  • Tool(s): OpenAI Codex desktop
  • Model(s): gpt-5.6-sol
  • Involvement: AI-assisted; blurbery orchestrated and directed the scope, constraints, evidence standard, browser acceptance, and publication route
  • Adversarial review: Compared f2d859e4 with the follow-up; traced direct Home, Home→item→Home, unrelated Back→Home, library→item, item→item, mobile gates, reduced motion, modified links, rapid/replaced hero fades, interrupted restoration, resize cleanup, 20-row completion, and timer/listener/observer/animation cleanup. Browser evidence is separated from unsupported or harness-distorted measurements.

Checklist

  • I read and can explain the complete diff.
  • This pull request addresses one concern.

@blurbery

Copy link
Copy Markdown
Owner Author

Superseded by upstream Silo-Server#838. Keeping the head branch because the upstream PR uses it; this fork PR is no longer needed.

@blurbery blurbery closed this Aug 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant