Combining Virtual Scroll With AI — Keeping 50,000 Log Lines Fast While Adding Gemini

hiyoyo
If this is useful, a ❤️ helps others find it. All tests run on an 8-year-old MacBook Air. HiyokoLogcat renders 50,000+ log lines without freezing, and has a Gemini AI button on every error line. These two features interact in non-obvious ways. Here's what I had to think through. The core tension Virtual scroll works by only rendering visible rows. Rows outside the viewport are unmounted from the DOM. AI buttons live on rows. If a row is unmounted, its button state is gone too. This means: if a u