From 0999b60726d21eb16ad78e377b3d53da9fb5ea03 Mon Sep 17 00:00:00 2001
From: llama <100429699+iamllama@users.noreply.github.com>
Date: Tue, 18 Feb 2025 08:16:02 +0800
Subject: [PATCH 1/2] add lru-cache
---
package.json | 1 +
yarn.lock | 1 +
2 files changed, 2 insertions(+)
diff --git a/package.json b/package.json
index e00ee830766..dcbd24531dd 100644
--- a/package.json
+++ b/package.json
@@ -75,6 +75,7 @@
"jquery": "^3.5.1",
"jquery-ui-dist": "^1.12.1",
"lodash-es": "^4.17.21",
+ "lru-cache": "^10.2.0",
"marked": "^5.1.0",
"mathjax": "^3.1.2"
},
diff --git a/yarn.lock b/yarn.lock
index 41efa3d0e5a..09cf5b67473 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -2033,6 +2033,7 @@ __metadata:
jquery-ui-dist: "npm:^1.12.1"
license-checker-rseidelsohn: "npm:=4.3.0"
lodash-es: "npm:^4.17.21"
+ lru-cache: "npm:^10.2.0"
marked: "npm:^5.1.0"
mathjax: "npm:^3.1.2"
prettier: "npm:^3.4.2"
From 73faaf18a06609aa67dc8af3f4a389583cd291d4 Mon Sep 17 00:00:00 2001
From: llama <100429699+iamllama@users.noreply.github.com>
Date: Tue, 18 Feb 2025 08:16:28 +0800
Subject: [PATCH 2/2] cache mathjax rendering
---
ts/editable/Mathjax.svelte | 34 +++++++++++++++++++++++++++++-----
1 file changed, 29 insertions(+), 5 deletions(-)
diff --git a/ts/editable/Mathjax.svelte b/ts/editable/Mathjax.svelte
index f6125055929..5fe48a4db9a 100644
--- a/ts/editable/Mathjax.svelte
+++ b/ts/editable/Mathjax.svelte
@@ -4,6 +4,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
-->