Skip to content

Fix slow output rendering in EmbeddedOutputModal by removing line-by-line animation#1550

Merged
deep1401 merged 2 commits intomainfrom
claude/fix-embedded-output-performance-GYiwO
Mar 16, 2026
Merged

Fix slow output rendering in EmbeddedOutputModal by removing line-by-line animation#1550
deep1401 merged 2 commits intomainfrom
claude/fix-embedded-output-performance-GYiwO

Conversation

@aliasaria
Copy link
Copy Markdown
Member

The PollingOutputTerminal was writing lines one at a time with a 10ms setTimeout
delay between each line. For a 2000-line file this meant 20+ seconds to render,
while the FileBrowserModal showed the same file instantly via a

 tag.

Changes:

  • Replace line queue + setTimeout animation with batch writes (single term.write call)
  • Track line count instead of full content string for cheaper change detection
  • Incremental updates still append only new lines on subsequent polls
  • Remove smoothScrollDuration (unnecessary with batch writes)
  • Remove unused lineAnimationDelay prop, timeout refs, and queue machinery

https://claude.ai/code/session_01MZYRwDhU7eNw66Sxi4NeEQ

…line animation

The PollingOutputTerminal was writing lines one at a time with a 10ms setTimeout
delay between each line. For a 2000-line file this meant 20+ seconds to render,
while the FileBrowserModal showed the same file instantly via a <pre> tag.

Changes:
- Replace line queue + setTimeout animation with batch writes (single term.write call)
- Track line count instead of full content string for cheaper change detection
- Incremental updates still append only new lines on subsequent polls
- Remove smoothScrollDuration (unnecessary with batch writes)
- Remove unused lineAnimationDelay prop, timeout refs, and queue machinery

https://claude.ai/code/session_01MZYRwDhU7eNw66Sxi4NeEQ
@paragon-review
Copy link
Copy Markdown

Paragon Review Skipped

Hi @aliasaria! Your Polarity credit balance is insufficient to complete this review.

Please visit https://home.polarity.cc to add more credits and continue using Paragon reviews.

@deep1401 deep1401 marked this pull request as draft March 16, 2026 15:00
@deep1401 deep1401 marked this pull request as ready for review March 16, 2026 19:10
@deep1401 deep1401 merged commit d3df2f7 into main Mar 16, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants