Skip to content

Commit c856806

Browse files
committed
docs: update IMPROVEMENTS.md for 2026-03-19 performance
1 parent b0f5b66 commit c856806

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

IMPROVEMENTS.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# PingDiff Improvement Log
22

3+
## 2026-03-19 — Performance: Memoize dashboard derived state
4+
5+
All derived values on the dashboard (filteredResults, avgPing, avgPacketLoss, avgJitter, regions, chartData, serverChartData) were being recomputed inline on every React render — including renders triggered by unrelated state changes like the loading flag toggling off. Wrapped each value in useMemo with the tightest possible dependency array, eliminating 5 O(n) reduce passes and 2 groupBy passes on every extraneous render. At current scale the savings are modest; at the 500-1000 result range the dashboard would hit without this change the difference is measurable. The memoized structure also makes data dependencies explicit and auditable at a glance.
6+
7+
**Files changed:** `web/src/app/dashboard/page.tsx`
8+
**Lines:** +76 / -56
9+
10+
311
## 2026-03-19 — New Feature: Date range filter and CSV export for dashboard
412

513
Added two practical dashboard improvements with no new dependencies and no API changes.

0 commit comments

Comments
 (0)