mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 02:48:13 -05:00
[GH-ISSUE #7005] marked.lexer bad performance in Safari
#14566
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?
Originally created by @zeyugao on GitHub (Nov 18, 2024).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/7005
Installation Method
docker for backend,
npm run devfor frontendEnvironment
Open WebUI Version:
bca9c71ed6Ollama (if applicable): N/A
Operating System: macOS 15.1 (24B83)
Browser (if applicable): Safari 18.1 (20619.2.8.11.10), Chrome 130.0.6723.117
Confirmation:
Expected Behavior:
[Describe what you expected to happen.]
Actual Behavior:
[Describe what actually happened.]
Description
Bug Summary:
marked.lexerworks bad in Safari, leading to response un-refresh due tosendPromptOpenAIupdate the response before themarked.lexerreturns. The response refresh is discarded as result.When rendering a relative long response, Chrome works fine
But safari takes a much longer time to process it
The previous log is printed by modifying
src/lib/components/chat/Messages/Markdown.svelteMaybe is it due to the bug of Safari https://github.com/markedjs/marked/issues/2863
So we can only try to do some mitigation to workaround it.
I propose to add a configuration to set the minimal update interval in
https://github.com/open-webui/open-webui/blob/dev/src/lib/components/chat/Chat.svelte#L1701
So that we can wait
marked.lexerfor some timeReproduction Details
Steps to Reproduce:
[Outline the steps to reproduce the bug. Be as detailed as possible.]
Logs and Screenshots
Browser Console Logs:
[Include relevant browser console logs, if applicable]
Docker Container Logs:
[Include relevant Docker container logs, if applicable]
Screenshots/Screen Recordings (if applicable):
[Attach any relevant screenshots to help illustrate the issue]
Additional Information
[Include any additional details that may help in understanding and reproducing the issue. This could include specific configurations, error messages, or anything else relevant to the bug.]
Note
If the bug report is incomplete or does not follow the provided instructions, it may not be addressed. Please ensure that you have followed the steps outlined in the README.md and troubleshooting.md documents, and provide all necessary information for us to reproduce and address the issue. Thank you!