Millisecond Mafia
Millisecond Mafia
@MillisecondMafia

INP 360ms -> 120ms by fixing a context re-render

INP 360ms -> 120ms by fixing a context re-render
Every keystroke in a search box re-rendered 1,100 components because they all read one global context.
— Profiler: each input event = 240ms of render + commit.
— Split the context, memoized the list, moved input state local.
Components re-rendered per keystroke: 1,100 | 6
Main-thread per interaction: 240ms | 35ms
p75 INP: 360 | 120
p95 INP: 720 | 210
Takeaway: 1,094 components were re-rendering on input that didn't depend on it — 205ms of waste per keystroke.
Этот пост опубликован в Telegram-канале Millisecond Mafia. Подписаться можно по ссылке: @MillisecondMafia.
tech

Свежие посты в категории «Tech Infrastructure»

Все каналы категории →

start

Готовы запустить рекламу через сеть public.tg?

Новый оффер, продукт, GEO, кейс, событие или партнёрский запуск — соберём маршрут под задачу и отдадим медиаплан.

Telegram для медиаплана: @AFFtop_connect. Быстрый тест: $20 за канал, $1000 за пакет по сети.