Grammarly's team addressed performance issues in their browser extension that caused user input lag, especially for power users with large documents. They established metrics to measure input latency and performed lab-based benchmarking to identify bottlenecks. Solving these issues involved redesigning user experience (e.g., delaying checks), optimizing highlight updates, and making suggestion processing asynchronous, resulting in a 91% reduction in input lag. Additionally, user experience improved, leading to a 9% decrease in users disabling the extension. Ongoing efforts focus on further performance improvements, including memory and CPU usage management.
https://www.grammarly.com/blog/engineering/reducing-text-input-lag/