[GH-ISSUE #22611] feat: Upgrade Svelte from v5.42.2 to v5.53.10 to reduce DOM fragmentation and improve rendering performance #106759

Closed
opened 2026-05-18 05:13:35 -05:00 by GiteaMirror · 5 comments
Owner

Originally created by @ShirasawaSama on GitHub (Mar 12, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/22611

Check Existing Issues

  • I have searched for all existing open AND closed issues and discussions for similar requests. I have found none that is comparable to my request.

Verify Feature Scope

  • I have read through and understood the scope definition for feature requests in the Issues section. I believe my feature request meets the definition and belongs in the Issues section instead of the Discussions.

Problem Description

The current version of Svelte used in Open WebUI is v5.42.2, which is significantly behind the latest release (v5.53.10). This outdated version has a known issue where the rendering process produces a large number of fragment DOM nodes (e.g., excessive Comment nodes and DocumentFragment wrappers used internally by Svelte's reconciliation logic). These fragment nodes substantially increase the total node count in the DOM tree, which leads to:

  • Frequent garbage collection cycles — The browser's memory management is constantly triggered to clean up short-lived fragment nodes, causing noticeable GC pauses and jank.
  • Higher memory pressure — The accumulated fragment nodes inflate memory usage, especially on pages with complex or deeply nested component trees (such as long chat histories in Open WebUI).
  • Degraded rendering performance — DOM operations (layout, paint, composite) become more expensive due to the bloated DOM, resulting in slower UI responsiveness.

The Svelte team has addressed these issues in subsequent releases with significant improvements to the internal DOM reconciliation and template instantiation mechanisms, drastically reducing the number of unnecessary fragment nodes generated during rendering.

Image

Desired Solution you'd like

Upgrade Svelte from v5.42.2 to v5.53.10 (the latest stable release). Based on benchmarking and profiling against the newer version, this upgrade is expected to deliver:

  • ~25% improvement in page rendering speed due to the reduction in fragment DOM nodes and more efficient DOM diffing.
  • Significantly reduced GC frequency and duration, leading to smoother UI interactions, especially during streaming responses and long conversation scrolling.
  • Lower overall memory footprint, improving stability on resource-constrained devices (e.g., tablets, low-end laptops).

This should be a relatively low-risk upgrade as Svelte v5.53.10 is a minor/patch update within the same major version, and the API surface remains backward-compatible. A thorough regression test of key UI flows (chat rendering, model switching, settings panels, etc.) should be sufficient to validate the upgrade.

New version:

Image

Alternatives Considered

No response

Additional Context

No response

Originally created by @ShirasawaSama on GitHub (Mar 12, 2026). Original GitHub issue: https://github.com/open-webui/open-webui/issues/22611 ### Check Existing Issues - [x] I have searched for all existing **open AND closed** issues and discussions for similar requests. I have found none that is comparable to my request. ### Verify Feature Scope - [x] I have read through and understood the scope definition for feature requests in the Issues section. I believe my feature request meets the definition and belongs in the Issues section instead of the Discussions. ### Problem Description The current version of Svelte used in Open WebUI is **v5.42.2**, which is significantly behind the latest release (**v5.53.10**). This outdated version has a known issue where the rendering process produces a large number of **fragment DOM nodes** (e.g., excessive `Comment` nodes and `DocumentFragment` wrappers used internally by Svelte's reconciliation logic). These fragment nodes substantially increase the total node count in the DOM tree, which leads to: - **Frequent garbage collection cycles** — The browser's memory management is constantly triggered to clean up short-lived fragment nodes, causing noticeable GC pauses and jank. - **Higher memory pressure** — The accumulated fragment nodes inflate memory usage, especially on pages with complex or deeply nested component trees (such as long chat histories in Open WebUI). - **Degraded rendering performance** — DOM operations (layout, paint, composite) become more expensive due to the bloated DOM, resulting in slower UI responsiveness. The Svelte team has addressed these issues in subsequent releases with significant improvements to the internal DOM reconciliation and template instantiation mechanisms, drastically reducing the number of unnecessary fragment nodes generated during rendering. <img width="1618" height="1644" alt="Image" src="https://github.com/user-attachments/assets/b0855ab3-bd21-4294-a2e1-d7efa0415c33" /> ### Desired Solution you'd like Upgrade Svelte from **v5.42.2** to **v5.53.10** (the latest stable release). Based on benchmarking and profiling against the newer version, this upgrade is expected to deliver: - **~25% improvement in page rendering speed** due to the reduction in fragment DOM nodes and more efficient DOM diffing. - **Significantly reduced GC frequency and duration**, leading to smoother UI interactions, especially during streaming responses and long conversation scrolling. - **Lower overall memory footprint**, improving stability on resource-constrained devices (e.g., tablets, low-end laptops). This should be a relatively low-risk upgrade as Svelte v5.53.10 is a minor/patch update within the same major version, and the API surface remains backward-compatible. A thorough regression test of key UI flows (chat rendering, model switching, settings panels, etc.) should be sufficient to validate the upgrade. New version: <img width="2698" height="1308" alt="Image" src="https://github.com/user-attachments/assets/68f18657-c6b0-4fec-ab1a-5b1d357268d3" /> ### Alternatives Considered _No response_ ### Additional Context _No response_
Author
Owner

@Classic298 commented on GitHub (Mar 12, 2026):

@danilowanner

<!-- gh-comment-id:4045492937 --> @Classic298 commented on GitHub (Mar 12, 2026): @danilowanner
Author
Owner

@Classic298 commented on GitHub (Mar 12, 2026):

much in favor

<!-- gh-comment-id:4045609155 --> @Classic298 commented on GitHub (Mar 12, 2026): much in favor
Author
Owner

@Classic298 commented on GitHub (Mar 15, 2026):

This might be the related commit bdb7d48cff

Waiting on tim to close this, let's check if there are any side effects on this

<!-- gh-comment-id:4064086631 --> @Classic298 commented on GitHub (Mar 15, 2026): This might be the related commit https://github.com/open-webui/open-webui/commit/bdb7d48cff5c5842e1bbadb393fddb427174f8c3 Waiting on tim to close this, let's check if there are any side effects on this
Author
Owner

@tjbck commented on GitHub (Mar 16, 2026):

Should be addressed in dev.

<!-- gh-comment-id:4065325208 --> @tjbck commented on GitHub (Mar 16, 2026): Should be addressed in dev.
Author
Owner

@danilowanner commented on GitHub (Mar 20, 2026):

Thanks!

<!-- gh-comment-id:4095744454 --> @danilowanner commented on GitHub (Mar 20, 2026): Thanks!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#106759