mirror of
https://github.com/DayuanJiang/next-ai-draw-io.git
synced 2026-09-02 01:20:23 +08:00
Skip Prism syntax highlighting while tool call is streaming — use plain <pre> during streaming and only run Prism once at completion. Also throttle scrollIntoView to once per 150ms to avoid layout thrashing. Profiled with Playwright + CDP: for 200-cell diagrams the longest browser task dropped from 6.7s to ~450ms and total long-task time fell from ~10.9s to ~1.1s.