Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Cache the handle to the zip files - prep

Manav Rathia49c7834d847
diff --git a/desktop/docs/dependencies.md b/desktop/docs/dependencies.md
index a9e92b50d8..31ac013199 100644
--- a/desktop/docs/dependencies.md
+++ b/desktop/docs/dependencies.md
@@ -128,3 +128,6 @@ watcher for the watch folders functionality.
[node-stream-zip](https://github.com/antelle/node-stream-zip) is used for
reading of large ZIP files (e.g. during imports of Google Takeout ZIPs).
+
+[lru-cache](https://github.com/isaacs/node-lru-cache) is used to cache file ZIP
+handles to avoid reopening them for every operation.
diff --git a/desktop/package.json b/desktop/package.json
index 29894c611f..286a0a9f91 100644
--- a/desktop/package.json
+++ b/desktop/package.json
@@ -34,6 +34,7 @@
"ffmpeg-static": "^5.2",
"html-entities": "^2.5",
"jpeg-js": "^0.4",
+ "lru-cache": "^10.2",
"next-electron-server": "^1",
"node-stream-zip": "^1.15",
"onnxruntime-node": "^1.18"
diff --git a/desktop/yarn.lock b/desktop/yarn.lock
index 78f98106ef..b8143820e3 100644
--- a/desktop/yarn.lock
+++ b/desktop/yarn.lock
@@ -2259,7 +2259,7 @@ lowercase-keys@^2.0.0:
resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-2.0.0.tgz#2603e78b7b4b0006cbca2fbcc8a3202558ac9479"
integrity sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==
-lru-cache@^10.2.0:
+lru-cache@^10.2, lru-cache@^10.2.0:
version "10.2.2"
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-10.2.2.tgz#48206bc114c1252940c41b25b41af5b545aca878"
integrity sha512-9hp3Vp2/hFQUiIwKo8XCeFVnrg8Pk3TYNPIR7tJADKi5YfcF7vEaK7avFHTlSy3kOKYaJQaalfEo6YuXdceBOQ==