Breaking up Long Tasks
Certain tasks on a user interaction can be blocking, giving the user a broken experience, and resulting in a low interaction to next paint(INP) metric score.
Some ways to optimise it are:
- Keep tasks small and dedicated to what they should do
- Use Chrome’s scheduler API to schedule tasks for browser
- Yield important tasks to the main thread
Join Nishu for a walk through of ways to measure and optimise the interaction experience.
Nishu Goel
Nishu Goel works with ePilot on their micro-frontend architecture. She writes TypeScript and Golang at work with her focus on the performance aspects of the existing and upcoming codebases.
She is the author of the book Angular Routing (BPB, 2019) and a JavaScript chapter (Web Almanac, 2021). Recognised as a Google Developer Expert, and a Microsoft MVP, she loves to share her work at unravelweb.dev