mirror of
https://github.com/open-webui/open-webui.git
synced 2026-06-05 00:10:27 -05:00
[PR #24957] perf: reduce chat rendering stalls #131612
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/24957
Author: @noufalkv
Created: 5/20/2026
Status: 🔄 Open
Base:
dev← Head:perf/tor-chat-rendering-reviewed📝 Commits (8)
703c0ffperf(codeblock): mount the editor only while editinga926995perf(codeblock): bound syntax highlighting workbdc30ddperf(tool-calls): render labels without nested markdown9f5818aperf(tool-calls): defer collapsed payload parsinge76309dfix(markdown): route tool details through tool renderer633765dfix(markdown): normalize structural detail boundariesdcee823fix(chat): ignore stale navigation loadsed19aa8perf(streaming): remove hot-path debug logging📊 Changes
8 files changed (+440 additions, -129 deletions)
View changed files
📝
src/lib/components/chat/Chat.svelte(+40 -22)📝
src/lib/components/chat/Messages/CodeBlock.svelte(+86 -10)📝
src/lib/components/chat/Messages/Markdown.svelte(+4 -1)📝
src/lib/components/chat/Messages/Markdown/MarkdownTokens.svelte(+75 -68)📝
src/lib/components/common/ToolCallDisplay.svelte(+82 -19)➕
src/lib/utils/marked/details-normalization.test.ts(+92 -0)➕
src/lib/utils/marked/details-normalization.ts(+59 -0)📝
src/routes/+layout.svelte(+2 -9)📄 Description
Pull Request Checklist
Note to first-time contributors: Please open a discussion post in Discussions to discuss your idea/fix with the community before creating a pull request, and describe your changes before submitting a pull request.
This is to ensure large feature PRs are discussed with the community first, before starting work on it. If the community does not want this feature or it is not relevant for Open WebUI as a project, it can be identified in the discussion before working on the feature and submitting the PR.
Before submitting, make sure you've checked the following:
Relates to #24949. If one does not exist, create one first. PRs without a linked issue or discussion may be closed without review.devbranch. PRs targetingmainwill be immediately closed.dev, split into isolated commits, and contains no unrelated commits.Changelog Entry
Description
Added
Changed
Deprecated
Removed
Fixed
Security
Breaking Changes
Additional Information
This PR supersedes #24952 and #24956 after maintainer/bot feedback. It keeps the implementation-only changes, preserves the required CLA section, and removes the stress-test fixture/script changes from the submitted branch.
The branch is split into one focused commit per isolated change:
perf(codeblock): mount the editor only while editingperf(codeblock): bound syntax highlighting workperf(tool-calls): render labels without nested markdownperf(tool-calls): defer collapsed payload parsingfix(markdown): route tool details through tool rendererfix(markdown): normalize structural detail boundariesfix(chat): ignore stale navigation loadsperf(streaming): remove hot-path debug loggingThis PR was prepared by an autonomous AI coding agent at a user's request, then manually reviewed and tested before marking the checklist item above. Please review it as an ordinary external contribution; no maintainer affiliation is implied.
Validation performed on the cleaned branch:
git diff --check origin/dev...HEADnpm run test:frontend -- --runScreenshots or Videos
Contributor License Agreement
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.