Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Rendering cost grows with transcript length while an answer streams

Open
#200 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
43/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Active
Tech stack
typescript

Research direction

Start by reading src/renderer/src/markdown.ts, views/transcript.ts, and src/shared/chat.ts:276-280 to trace Markdown rendering and streamed event updates. Compare the cost of processing a long transcript and streaming answer, then add a performance test covering both; done means the proposed optimizations are validated without changing the expected transcript behavior.

Written by the indexing model from the issue text.

Description

enhancement performance priority: medium severity: low

Suggestions from the 2026-10-07 code review (not bugs).

  • Markdown: while an answer streams, renderItem → renderMarkdown re-parses and re-highlights the whole answer on every frame (src/renderer/src/markdown.ts, views/transcript.ts), which is O(n²) for long answers.
  • Reducer: applyChatEvent (src/shared/chat.ts:276-280) maps every transcript item for each streamed delta, in both the main process and the renderer.

Proposal

  • Skip syntax highlighting until the message ends, or highlight only completed code blocks.
  • Update the target item in place, or copy only the last item, when the event's target is the last item (almost always the case).
  • Add a perf test with a long transcript and a long streaming answer.
Dominant language
TypeScript
Stars
2
Forks
2
Avg merge
5h 28m
Merged PRs (30d)
24

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from PierrunoYT/patch

All issues in PierrunoYT/patch

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.