Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(927)

Unified Diff: pkg/analyzer/lib/src/generated/engine.dart

Issue 2383203003: Add an analysis option to disable cache flushing. (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analyzer/lib/src/context/context.dart ('k') | pkg/analyzer/test/src/context/builder_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/generated/engine.dart
diff --git a/pkg/analyzer/lib/src/generated/engine.dart b/pkg/analyzer/lib/src/generated/engine.dart
index 01b2cede1cce9ffe875fbfcbf754f8bf424eb3cf..1be94d60629d9fe46d0452fd69836b7c29840b1b 100644
--- a/pkg/analyzer/lib/src/generated/engine.dart
+++ b/pkg/analyzer/lib/src/generated/engine.dart
@@ -1072,6 +1072,17 @@ abstract class AnalysisOptions {
bool get dart2jsHint;
/**
+ * Return `true` if cache flushing should be disabled. Setting this option to
+ * `true` can improve analysis speed at the expense of memory usage. It may
+ * also be useful for working around bugs.
+ *
+ * This option should not be used when the analyzer is part of a long running
+ * process (such as the analysis server) because it has the potential to
+ * prevent memory from being reclaimed.
+ */
+ bool get disableCacheFlushing;
+
+ /**
* Return `true` if the parser is to parse asserts in the initializer list of
* a constructor.
*/
@@ -1305,6 +1316,9 @@ class AnalysisOptionsImpl implements AnalysisOptions {
@override
bool trackCacheDependencies = true;
+ @override
+ bool disableCacheFlushing = false;
+
/**
* A flag indicating whether implicit casts are allowed in [strongMode]
* (they are always allowed in Dart 1.0 mode).
@@ -1371,6 +1385,7 @@ class AnalysisOptionsImpl implements AnalysisOptions {
implicitDynamic = options.implicitDynamic;
}
trackCacheDependencies = options.trackCacheDependencies;
+ disableCacheFlushing = options.disableCacheFlushing;
finerGrainedInvalidation = options.finerGrainedInvalidation;
}
« no previous file with comments | « pkg/analyzer/lib/src/context/context.dart ('k') | pkg/analyzer/test/src/context/builder_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698