Skip to content

Commit d896213

Browse files
committed
feat(analyze): enable namespace caching by default
Namespace caching speeds up startup for large projects by skipping re-analysis of unchanged files. It is now mature enough to be enabled by default.
1 parent 78a26c3 commit d896213

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1039,7 +1039,7 @@
10391039
},
10401040
"robotcode.analysis.cache.cacheNamespaces": {
10411041
"type": "boolean",
1042-
"default": false,
1042+
"default": true,
10431043
"markdownDescription": "If enabled, caches fully analyzed namespace data (diagnostics, references, scopes) to disk. This can speed up startup for large projects by skipping re-analysis of unchanged files. If you experience issues, disable this setting.\n\nIf you change this setting, you may need to run the command `RobotCode: Clear Cache and Restart Language Servers`.",
10441044
"scope": "resource"
10451045
},

packages/analyze/src/robotcode/analyze/config.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -387,9 +387,7 @@ def to_workspace_analysis_config(self) -> WorkspaceAnalysisConfig:
387387
ignored_libraries=self.cache.ignored_libraries or [],
388388
ignored_variables=self.cache.ignored_variables or [],
389389
ignore_arguments_for_library=self.cache.ignore_arguments_for_library or [],
390-
cache_namespaces=(
391-
self.cache.cache_namespaces if self.cache.cache_namespaces is not None else False
392-
),
390+
cache_namespaces=(self.cache.cache_namespaces if self.cache.cache_namespaces is not None else True),
393391
)
394392
if self.cache is not None
395393
else WorkspaceCacheConfig()

packages/robot/src/robotcode/robot/diagnostics/workspace_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class CacheConfig(ConfigBase):
4949
ignored_libraries: List[str] = field(default_factory=list)
5050
ignored_variables: List[str] = field(default_factory=list)
5151
ignore_arguments_for_library: List[str] = field(default_factory=list)
52-
cache_namespaces: bool = False
52+
cache_namespaces: bool = True
5353

5454

5555
@config_section("robotcode.analysis.robot")

0 commit comments

Comments
 (0)