You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: test/e2e/specs/07-performance/PERFORMANCE.md
+10-5Lines changed: 10 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,12 @@ Failures: Firefox + Mobile Safari FID measured 127 ms/126 ms (threshold 100
7
7
- measureFID clicks the first interactive container right after networkidle, so any document-level listener that executes synchronously inflates this metric. index.ts binds multiple global click, touchend, and keydown handlers plus Lit store updates during initialize(). Those handlers always run before the synthetic click resolves, keeping the main thread busy for ~25 ms on desktop and ~40 ms on mobile.
8
8
9
9
- index.ts eagerly instantiates focus-trap, registers document keyup/pointerdown, and intercepts every nav link to reroute through astro:transitions. All of that work executes before the first user click completes, which is why only browsers with slower event loop scheduling (Gecko/WebKit) exceed 100 ms.
10
-
Mitigations: lazily register these web components behind requestIdleCallback/queueMicrotask so initial navigation/interactions aren't blocked; bind document listeners only after the relevant UI opens; gate LitElement hydration on an IntersectionObserver so off-screen modals (theme picker) stay inert until revealed.
10
+
11
+
**Mitigations:**
12
+
13
+
- lazily register these web components behind requestIdleCallback/queueMicrotask so initial navigation/interactions aren't blocked
14
+
- bind document listeners only after the relevant UI opens
15
+
- gate LitElement hydration on an IntersectionObserver so off-screen modals (theme picker) stay inert until revealed.
11
16
12
17
## Total Blocking Time (TBT) regressions (Chromium desktop + mobile)
13
18
@@ -17,13 +22,13 @@ Mitigations: lazily register these web components behind requestIdleCallback/que
17
22
18
23
- Global error-handling utilities (@components/scripts/errors/*) are imported by all of the above and run in the same navigation task. Whenever addScriptBreadcrumb fires during initialization, it formats stack traces and sends data to the client logger, increasing long-task duration.
19
24
20
-
## Mitigations
25
+
**Mitigations**
21
26
22
-
1. Convert carousel/testimonial scripts to lazy web components that hydrate only when the element enters the viewport, and defer Embla imports via dynamic import() to split the bundle.
27
+
- Convert carousel/testimonial scripts to lazy web components that hydrate only when the element enters the viewport, and defer Embla imports via dynamic import() to split the bundle.
23
28
24
-
1. Gate animation lifecycle initialization until the first component actually requests animation control, and wrap it in requestIdleCallback so it never runs inside the navigation task.
29
+
- Gate animation lifecycle initialization until the first component actually requests animation control, and wrap it in requestIdleCallback so it never runs inside the navigation task.
25
30
26
-
1. Move breadcrumb/error instrumentation behind an environment flag or lazy loader so production visitors don't pay the cost before interaction.
31
+
- Move breadcrumb/error instrumentation behind an environment flag or lazy loader so production visitors don't pay the cost before interaction.
0 commit comments