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

Unified Diff: pkg/analyzer_cli/lib/src/incremental_analyzer.dart

Issue 2064613004: Compact incremental cache when we're done using it. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 6 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/test/src/summary/incremental_cache_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer_cli/lib/src/incremental_analyzer.dart
diff --git a/pkg/analyzer_cli/lib/src/incremental_analyzer.dart b/pkg/analyzer_cli/lib/src/incremental_analyzer.dart
index f9d8d4c63a7abe25fa0efe7823144d4c5dd4d363..d57327a6b1e20b5e22af050aa3556e243040699d 100644
--- a/pkg/analyzer_cli/lib/src/incremental_analyzer.dart
+++ b/pkg/analyzer_cli/lib/src/incremental_analyzer.dart
@@ -48,7 +48,7 @@ IncrementalAnalysisSession configureIncrementalAnalysis(
context.resultProvider = new _CacheBasedResultProvider(context, cache);
// Listen for new libraries to put into the cache.
_IncrementalAnalysisSession session =
- new _IncrementalAnalysisSession(options, context, cache);
+ new _IncrementalAnalysisSession(options, storage, context, cache);
context
.onResultChanged(LIBRARY_ELEMENT1)
.listen((ResultChangedEvent event) {
@@ -172,13 +172,14 @@ class _CacheBasedResultProvider extends ResynthesizerResultProvider {
class _IncrementalAnalysisSession implements IncrementalAnalysisSession {
final CommandLineOptions commandLineOptions;
+ final CacheStorage cacheStorage;
final AnalysisContext context;
final IncrementalCache cache;
final Set<Source> newLibrarySources = new Set<Source>();
_IncrementalAnalysisSession(
- this.commandLineOptions, this.context, this.cache);
+ this.commandLineOptions, this.cacheStorage, this.context, this.cache);
@override
void finish() {
@@ -189,6 +190,8 @@ class _IncrementalAnalysisSession implements IncrementalAnalysisSession {
}
_putLibrary(librarySource);
}
+ // Compact the cache.
+ cacheStorage.compact();
}
@override
« no previous file with comments | « pkg/analyzer/test/src/summary/incremental_cache_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698