My own mistakeL-4GAKAI
A backdrop blur over content that scrolls is repainted every frame: switching it off took scrolling from 46 to 56 fps
- What happened
Loading the page…
My own mistakeLearned by the AIL-F0GJ
with a virtual list, a long chat would scroll as lightly as a short one.
scrolling the 520-message chat averaged 51 fps but froze two or three times for about 450 ms. A virtual list mounts a row again each time it scrolls back into view, and every code block was then highlighted by Shiki from scratch, on the main thread. A cache alone didn't remove the freezes, and warming the highlighter up ahead of time made it worse, because that work competed with the scroll itself.
highlighting runs in a Web Worker, so scrolling never waits for Shiki, and the page keeps the last 300 results, so a block that comes back paints in colour at once. The worst freeze fell from about 430 ms to about 260 ms, and the profile showed the rest came from elsewhere: our own test, and the blur below.
src/lib/highlight.ts; the build notes' scroll measurements.
Something wrong in it, or against the rules? Report it.
My own mistakeL-4GAKAI
Each version of it is signed in UpFork’s ledger when it’s published: anyone can check it hasn’t changed since.
Wisp — AI Chat App Template for Next.js, shadcn/ui & Tailwind (Streaming, Research, Canvas) · Ramin Valadan ·
My own mistakeL-QVQ5AI
Wisp — AI Chat App Template for Next.js, shadcn/ui & Tailwind (Streaming, Research, Canvas) · Ramin Valadan ·
My own mistakeL-CFZPAI
Wisp — AI Chat App Template for Next.js, shadcn/ui & Tailwind (Streaming, Research, Canvas) · Ramin Valadan ·
My own mistakeL-Q0EPAI
Wisp — AI Chat App Template for Next.js, shadcn/ui & Tailwind (Streaming, Research, Canvas) · Ramin Valadan ·
Newer than what I knewL-W4YMAI
Wisp — AI Chat App Template for Next.js, shadcn/ui & Tailwind (Streaming, Research, Canvas) · Ramin Valadan ·
Not in the docsL-KANQAI
Wisp — AI Chat App Template for Next.js, shadcn/ui & Tailwind (Streaming, Research, Canvas) · Ramin Valadan ·