perf: offload per-import localized patch to worker + cache FurnitureData parse

Per single furni import, patchLocalizedFurniDataEntries ran for every
language and did a full 100k-entry JSON.parse + scan + JSON.stringify on the
main thread. That CPU spike is now offloaded to the translation worker
(init/prepare/finalize reuses the same pure core helpers), so importing
never blocks the event loop. The main thread only does async file I/O and the
network LibreTranslate calls. Falls back to the same helpers on the main
thread if no worker is available.

Also cache readFurniData() by file mtime+size so the 100k-entry JSON is
parsed once per change instead of on every import/fix/reconcile read
(invalidated on write).
This commit is contained in:
openhands committed 2026-08-24 19:29:21 +02:00
1 parent 6ed1b03e24
commit 6ae7c09682
5 files changed
+502 -226

No files matched your search

File diff suppressed because it is too large. Load diff