Payload is the open-source, fullstack Next.js framework, giving you instant backend superpowers. Get a full TypeScript backend and admin panel instantly. Use Payload as a headless CMS or for building powerful applications.
perf(richtext-lexical): improve typing performance while toolbars are enabled (#12669)
The lexical fixed and inline toolbars do active / enabled state calculations for toolbar buttons / dropdowns on every keystroke. This can incur a performance hit on slow machines. This PR - deprioritizes these state calculations using `useDeferredValue` and `requestIdleCallback` - introduces additional memoization and replace unnecessary `useEffect`s to reduce re-rendering ## Before (20x cpu throttling) https://github.com/user-attachments/assets/dfb6ed79-b5bd-4937-a01d-cd26f9a23831 ## After (20x cpu throttling) https://github.com/user-attachments/assets/d4722fb4-5fd0-48b5-928c-35fcd4f98f78
A
Alessio Gravili committed
aef4f779b1e4487131a9aea32f1379326bab5b33
Parent: 6466684
Committed by GitHub <noreply@github.com>
on 6/5/2025, 4:51:32 PM