Files
open-webui/src/lib
Classic298 7ea6afdf95 perf: cache KaTeX module import as singleton across all renderer instances (#21880)
* perf: cache KaTeX module import as singleton across all renderer instances

KatexRenderer.svelte dynamically imports katex, mhchem, and the CSS on every component mount. When a message contains multiple math expressions, this triggers redundant module resolution for each one. Move the import promise to a module-level singleton using Svelte's context='module' script block so it loads once and is shared across all KatexRenderer instances.

* Update KatexRenderer.svelte
2026-02-26 15:34:42 -06:00
..
2026-02-25 16:13:18 -06:00
2026-02-23 15:49:05 -06:00
2026-02-25 19:58:50 -06:00
2026-02-12 16:13:48 -06:00
2025-11-23 20:15:52 -05:00
…
2026-02-23 02:54:53 -06:00