mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 02:48:13 -05:00
[PR #22099] [CLOSED] perf: remove unnecessary JSON.parse(JSON.stringify()) on string primitives #26482
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/22099
Author: @Classic298
Created: 3/1/2026
Status: ❌ Closed
Base:
dev← Head:perf/remove-string-cloning📝 Commits (3)
90c7f07perf: remove unnecessary JSON.parse(JSON.stringify()) on string primitivesd667117Merge branch 'dev' into perf/remove-string-cloninga8fb934Update Chat.svelte📊 Changes
2 files changed (+5 additions, -5 deletions)
View changed files
📝
src/lib/components/chat/Chat.svelte(+4 -4)📝
src/lib/components/notes/NoteEditor.svelte(+1 -1)📄 Description
Strings are immutable primitives in JavaScript — cloning them via JSON.parse(JSON.stringify()) is pure overhead that returns an identical value. Removes 5 instances: 4 in Chat.svelte (chatId, message.id) and 1 in NoteEditor.svelte (note.title).
Contributor License Agreement
By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.