brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: paint flashing in DevTools shows which parts of a page repaint

Devtools
~/tips/tip-devtools-paint-flashing

Show Rendering > Paint flashing

Find animations and widgets that redraw far more than they need to.

A page can feel heavy while nothing seems to happen. One checkbox makes the browser show its redrawing work, and the result is sometimes a surprise.

Open the command menu with Ctrl+Shift+P (Cmd+Shift+P on a Mac):

Show Rendering > Paint flashing

Areas that get repainted now flash green. Scroll, hover over menus, open a dropdown and watch. A small spinner that flashes just itself is fine. A spinner that makes the whole screen blink green every frame is worth a look, and so is a page that keeps flashing while you do nothing at all.

The usual suspects are animations of properties such as width, top or box-shadow. Trying the same movement with transform or opacity often calms the flashing down, and you see the difference immediately.

Green does not automatically mean slow. Browsers have to paint, and a short flash after a click is normal. I treat it as a pointer to where to look, then use the Performance panel to measure whether it costs real time. The flashing can be hard on the eyes, so switch it off afterwards, especially if you are sensitive to flicker.

Further reading: Chrome DevTools: rendering performance features

More Devtools tips Clear site data for one site from Chrome DevTools user.id === 42 $x(path [, startNode]) @media (prefers-color-scheme: dark) { queryObjects(Promise) All Devtools tips (22) All topics

Link