Commit Graph
6 Commits
Author SHA1 Message Date
Timothy Jaeryang Baek 646b64a318 refac 2026-02-27 13:37:03 -06:00
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
Timothy Jaeryang Baek c01255570b chore: format 2025-09-17 11:11:46 -05:00
Shirasawa 9b3d71f0d2 feat: Dynamically load katex to improve first-screen loading speed 2025-09-17 04:18:16 +00:00
Timothy J. Baek 63418a583a fix: latex rendering issue 2024-08-22 14:24:49 +02:00
Timothy J. Baek b02f6db475 refac 2024-08-18 18:28:58 +02:00