mirror of
https://github.com/DayuanJiang/next-ai-draw-io.git
synced 2026-09-01 17:10:24 +08:00
* fix: reduce CPU usage during large XML streaming 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. * fix: add trailing edge to scroll throttle Ensures the chat scrolls to the bottom after streaming ends, even if the last messages update arrives during the 150ms throttle window.
11 KiB
11 KiB