Skip to content

Improve Governance page load speed without cacheΒ #341

@ECWireless

Description

@ECWireless

πŸ§ͺ Performance Benchmark Report β€” https://explorer.livepeer.org/voting/

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.55 β‰ˆ 0.57 β‰ˆ 0.56 β‰ˆ 0.56 β‰₯ 0.90 ⚠️ Needs work
First Contentful Paint (FCP) 2.2 s 1.9 s 2.0 s 2.0 s ≀ 1.8 s ⚠️ Slightly slow
Largest Contentful Paint (LCP) 13.9 s 13.8 s 13.3 s β‰ˆ 13.7 s ❌ ≀ 2.5 s 🚨 Severe delay
Speed Index 2.2 s 1.9 s 2.1 s 2.1 s βœ… ≀ 3.0 s βœ… Good
Cumulative Layout Shift (CLS) 0.00 0.00 0.00 0.00 βœ… ≀ 0.10 βœ… Excellent
Total Blocking Time (TBT) 3.4 s 3.2 s 3.3 s β‰ˆ 3.3 s ❌ ≀ 0.2 s 🚨 Poor
Time to Interactive (TTI) 31 s 32 s 33 s β‰ˆ 32 s ❌ ≀ 4 s 🚨 Poor
Total Transfer Size 5.4 MB 5.5 MB 5.5 MB β‰ˆ 5.5 MB ❌ < 2 MB 🚨 Heavy

🩺 Diagnosis Summary

βœ… The Good

  • Server response and initial paint are reasonable (β‰ˆ 2 s FCP).
  • Layout stability is perfect (0 CLS).
  • Speed Index β‰ˆ 2 s β†’ visual load is fast once LCP finally renders.

⚠️ The Bad

  • LCP β‰ˆ 13–14 s – the hero element or first major content loads extremely late.
  • ~4 MB of JavaScript blocking the main thread.
  • TTI > 30 s & TBT β‰ˆ 3 s β†’ page is effectively unresponsive for users after visual paint.
  • Suspense/data-fetch hydration and graph/contract widgets likely defer LCP.

🧩 Probable Root Causes

  1. Large client bundle: heavy component tree or charting/contract logic shipped upfront.
  2. Late-loading hero section: delayed render of voting widget or GraphQL data fetch.
  3. Hydration cost: React mounts large dynamic tree (charts, delegators, wallet context).
  4. Third-party scripts: analytics or embed scripts running before interactivity.

πŸ› οΈ Recommended Actions (ordered by impact)

Priority Goal Actions
1️⃣ Improve LCP to < 2.5 s Render critical content early β€’ Server-render the vote header & hero stats.
β€’ Defer non-critical charts using next/dynamic({ ssr:false }).
2️⃣ Cut bundle size by > 70 % Lower JS blocking time β€’ Run @next/bundle-analyzer.
β€’ Move heavy UI to Server Components.
β€’ Lazy-load rarely used widgets (voting modals, charts).
3️⃣ Defer client work Lower TBT/INP β€’ Load analytics afterInteractive.
β€’ Use React.startTransition for updates.
β€’ Split hydration via smaller islands.
4️⃣ Cache data server-side Speed up LCP & TTI β€’ Pre-render vote stats (ISR revalidate 10–30 s).
β€’ Parallelize GraphQL fetches.
5️⃣ Trim assets Reduce transfer size β€’ Drop unused libs and polyfills.
β€’ Verify images are compressed and cached.

🎯 Target Benchmarks

Metric Current Target Ξ”
LCP 13.7 s ≀ 2.5 s βˆ’82 %
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.56 β†’ 0.93–0.95 once bundle size and LCP are optimized.


πŸ“ˆ Additional Steps

  • Add @vercel/analytics to start collecting real LCP/INP/CLS field data.
  • Automate Lighthouse runs in CI for regression alerts.
  • Re-test after lazy-loading graphs / reducing bundle size.

Compiled from 3 Lighthouse v13 mobile runs on 2025-11-12.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions