Profile Emacs scroll cost per feature with benchmark-run + redisplay
To find why Emacs code panes scroll slowly, measure per-step cost in the live window: (with-selected-window w (benchmark-run 10 (progn (scroll-up 3) (redisplay t)))), calling font-lock-flush first for an uncolored baseline, then toggle one feature at a time and re-measure. On a pgtk build this showed about 12 ms per step: about 6 ms from fontifying newly exposed text (fixed ahead of time with jit-lock-stealth-time), about 3 ms from display-line-numbers, 2.5 ms from eglot inlay hints, and 1 ms from auto-composition-mode (disable it buffer-locally in prog-mode). Run each measurement several times: under system load, single runs varied from 13 to 18 ms. Emacs has no GPU rendering path, so about 8 to 10 ms is the floor; for VS Code-like smoothness use a GPU editor such as Zed.