Vitals 101
Vitals 101
@CoreVitals101

A search box went from 380ms to 90ms with one tweak

A search box went from 380ms to 90ms with one tweak

INP — Interaction to Next Paint — measures how fast a page reacts when you click or type. Think of it like a waiter: a low INP means they take your order instantly; a high one means they vanish into the kitchen first.

A site had a search box that filtered results on every keystroke. Each letter triggered a heavy re-render, so INP sat at 380ms (anything over 200ms feels sluggish).

The fix was a 'debounce' — wait until typing pauses for 150ms, then filter once instead of on every key.

— Before: 12 re-renders for the word 'shoes'.
— After: 1 re-render.
— INP dropped to 90ms.

Try this: type fast in your own search field. If results stutter behind your fingers, debouncing is your fix.
Этот пост опубликован в Telegram-канале Vitals 101. Подписаться можно по ссылке: @CoreVitals101.
tech

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

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

start

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

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

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