-
Notifications
You must be signed in to change notification settings - Fork 17
Closed
Milestone
Description
π§ͺ Performance Benchmark Report β https://explorer.livepeer.org/treasury/
Date: 2025-11-12
Environment: Lighthouse v13.0.1 (mobile emulation, slow-4G, 4Γ CPU slowdown)
Runs: 3 consecutive
π Median Results (3-run average)
| Metric | Run 1 | Run 2 | Run 3 | Median | βGoodβ Threshold | Status |
|---|---|---|---|---|---|---|
| Performance Score | β 0.50 | β 0.52 | β 0.51 | β 0.51 | β₯ 0.90 | |
| First Contentful Paint (FCP) | 1.8 s | 1.8 s | 1.8 s | 1.8 s β | β€ 1.8 s | β Excellent |
| Largest Contentful Paint (LCP) | 22.0 s | 21.9 s | 21.9 s | β 21.9 s β | β€ 2.5 s | π¨ Severe delay |
| Speed Index | 1.8 s | 1.8 s | 1.8 s | 1.8 s β | β€ 3.0 s | β Excellent |
| Cumulative Layout Shift (CLS) | 0.00 | 0.00 | 0.00 | 0.00 β | β€ 0.10 | β Excellent |
| Total Blocking Time (TBT) | ~3.2 s | ~3.3 s | ~3.4 s | β 3.3 s β | β€ 0.2 s | π¨ Poor |
| Time to Interactive (TTI) | ~31 s | ~32 s | ~32 s | β 32 s β | β€ 4 s | π¨ Poor |
| Total Transfer Size | ~5.5 MB | ~5.4 MB | ~5.4 MB | β 5.4 MB β | < 2 MB | π¨ Heavy |
π©Ί Diagnosis Summary
β The good
- FCP and Speed Index are both strong (β 1.8 s) β the initial shell paints quickly.
- CLS = 0 β layout is stable.
- Server response time is fast and consistent.
- LCP β 22 s: the main treasury content doesnβt appear until all client-side data and JS finish loading.
- TBT β 3 s, TTI β 32 s: JS parsing and hydration keep the main thread busy for a long time.
- JS transfer β 4 MB: excessive bundle weight is the root cause.
π§© Probable Root Causes
- Client-side data fetching β treasury values or balances load only after hydration, delaying the largest visible element.
- Large client bundle β expensive logic or libraries included in the initial route bundle.
- Hydration cost β the component tree mounts all at once after load.
- Third-party scripts β analytics or embeds run before interactivity.
π οΈ Recommended Actions (ordered by impact)
| Priority | Goal | Recommended Actions |
|---|---|---|
| 1οΈβ£ Server-render treasury data | Show main content instantly | β’ Fetch treasury data via getServerSideProps or ISR (revalidate interval).β’ Avoid client-only fetch on initial load. |
| 2οΈβ£ Reduce JS bundle size | Lower TBT / improve responsiveness | β’ Run @next/bundle-analyzer.β’ Lazy-load non-critical UI (e.g., secondary tables or wallet logic). β’ Convert reusable components to Server Components. |
| 3οΈβ£ Optimize hydration | Lower INP & TTI | β’ Break large components into smaller chunks. β’ Use React.startTransition for state updates.β’ Memoize expensive effects. |
| 4οΈβ£ Defer analytics | Free up main thread | β’ Load analytics with strategy:"afterInteractive". |
| 5οΈβ£ Maintain light assets | Keep total < 2 MB | β’ Remove unused libraries and polyfills. β’ Images are already optimized. |
π― Target Benchmarks
| Metric | Current | Target | Ξ |
|---|---|---|---|
| LCP | 21.9 s | β€ 2.5 s | β89 % |
| TBT | 3.3 s | β€ 0.2 s | β94 % |
| TTI | 32 s | β€ 4 s | β88 % |
| JS Transfer | 4.0 MB | β€ 0.5 MB gz | β88 % |
| CLS | 0.00 | β€ 0.10 | Maintain β |
Expected result: overall Lighthouse Performance Score β 0.51 β 0.93β0.95 after server-rendering data and slimming the JS bundle.
π Additional Steps
- Move treasury data fetching to the server with ISR or
getServerSideProps. - Add
@vercel/analyticsto confirm improvements via field data (LCP/INP/CLS). - Run Lighthouse after each major change to track progress.
- Automate Lighthouse runs in CI for regression detection.
Compiled from 3 Lighthouse v13 mobile runs on 2025-11-12.
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Done