Personal AI, On Personal Devices
Python
perf: cache load_config() with lru_cache to avoid repeated hardware detection
Jon Saad-Falcon0481f3212983
diff --git a/src/openjarvis/core/config.py b/src/openjarvis/core/config.pyindex 3db5bc53..76ca3c8d 100644--- a/src/openjarvis/core/config.py+++ b/src/openjarvis/core/config.py@@ -7,6 +7,7 @@ found in the TOML file.from __future__ import annotations+import functoolsimport osimport platformimport shutil@@ -1189,6 +1190,7 @@ def _migrate_toml_data(data: Dict[str, Any], cfg: "JarvisConfig") -> None:)[email protected]_cache(maxsize=1)def load_config(path: Optional[Path] = None) -> JarvisConfig:"""Detect hardware, build defaults, overlay TOML overrides.