Crafting a better, faster code view
Jun 21, 2023Joshua Brown

Summary
This post details the development of a new code view architecture for GitHub. It addresses performance issues with large files by introducing an invisible textarea containing the entire file content (for accessibility and native find functionality) and a virtualized, syntax-highlighted overlay for visual display. This approach reduces DOM nodes, improves LCP and TTI, and enables native browser find capabilities, overcoming limitations of previous virtualization attempts.