[PR #1741] [MERGED] fix: Improve katex render performance in responses #7559

Closed
opened 2025-11-11 17:30:10 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/1741
Author: @domsleee
Created: 4/25/2024
Status: Merged
Merged: 4/25/2024
Merged by: @tjbck

Base: devHead: katex-render-performance


📝 Commits (2)

  • 06a6136 fix: improve katex render performance in responses
  • dcb92f7 refac: naming convention

📊 Changes

2 files changed (+4 additions, -3 deletions)

View changed files

📝 backend/start_windows.bat (+1 -1)
📝 src/lib/components/chat/Messages/ResponseMessage.svelte (+3 -2)

📄 Description

Pull Request Checklist

  • Description: Briefly describe the changes in this pull request.
  • Changelog: Ensure a changelog entry following the format of Keep a Changelog is added at the bottom of the PR description.
  • Documentation: Have you updated relevant documentation?
  • Dependencies: Are there any new dependencies? Have you updated the dependency versions in the documentation?

Description

Improve render performance of katex by making ResponseMessage only call katex auto_render on its children, instead of the entire document.

This is much faster since every time a token is received, every ResponseMessage is rendered again.

Related: #1740


Changelog Entry

Fixed

  • Improved render performance of katex

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/open-webui/open-webui/pull/1741 **Author:** [@domsleee](https://github.com/domsleee) **Created:** 4/25/2024 **Status:** ✅ Merged **Merged:** 4/25/2024 **Merged by:** [@tjbck](https://github.com/tjbck) **Base:** `dev` ← **Head:** `katex-render-performance` --- ### 📝 Commits (2) - [`06a6136`](https://github.com/open-webui/open-webui/commit/06a61366713bbc171555daff5a9e169bb44f90e4) fix: improve katex render performance in responses - [`dcb92f7`](https://github.com/open-webui/open-webui/commit/dcb92f7f74209e6ec49f2aa1852ddafdbae47c4b) refac: naming convention ### 📊 Changes **2 files changed** (+4 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `backend/start_windows.bat` (+1 -1) 📝 `src/lib/components/chat/Messages/ResponseMessage.svelte` (+3 -2) </details> ### 📄 Description ## Pull Request Checklist - [x] **Description:** Briefly describe the changes in this pull request. - [x] **Changelog:** Ensure a changelog entry following the format of [Keep a Changelog](https://keepachangelog.com/) is added at the bottom of the PR description. - [x] **Documentation:** Have you updated relevant documentation? - [x] **Dependencies:** Are there any new dependencies? Have you updated the dependency versions in the documentation? --- ## Description Improve render performance of katex by making `ResponseMessage` only call katex `auto_render` on its children, instead of the entire `document`. This is much faster since every time a token is received, every `ResponseMessage` is rendered again. Related: #1740 --- ### Changelog Entry ### Fixed - Improved render performance of katex --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-11 17:30:10 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#7559