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

Unified Diff: pkg/analysis_server/lib/src/operation/operation_analysis.dart

Issue 2298043002: Revert "Flush AST results for source outside of the analysis roots." (Closed)
Patch Set: Created 4 years, 4 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 | « no previous file | pkg/analysis_server/test/domain_completion_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/lib/src/operation/operation_analysis.dart
diff --git a/pkg/analysis_server/lib/src/operation/operation_analysis.dart b/pkg/analysis_server/lib/src/operation/operation_analysis.dart
index 3263d2b6923a31e1a338211bbb836b858b80dd64..b99cec3c962d6f50e1e93839a4db7e6a9c494e40 100644
--- a/pkg/analysis_server/lib/src/operation/operation_analysis.dart
+++ b/pkg/analysis_server/lib/src/operation/operation_analysis.dart
@@ -9,7 +9,6 @@ import 'package:analysis_server/src/computer/computer_highlights.dart';
import 'package:analysis_server/src/computer/computer_highlights2.dart';
import 'package:analysis_server/src/computer/computer_outline.dart';
import 'package:analysis_server/src/computer/computer_overrides.dart';
-import 'package:analysis_server/src/context_manager.dart';
import 'package:analysis_server/src/domains/analysis/implemented_dart.dart';
import 'package:analysis_server/src/domains/analysis/navigation.dart';
import 'package:analysis_server/src/domains/analysis/occurrences.dart';
@@ -22,8 +21,6 @@ import 'package:analyzer/dart/element/element.dart';
import 'package:analyzer/src/generated/engine.dart';
import 'package:analyzer/src/generated/error.dart';
import 'package:analyzer/src/generated/source.dart';
-import 'package:analyzer/task/dart.dart';
-import 'package:analyzer/task/model.dart';
/**
* Runs the given function [f] with the working cache size in [context].
@@ -379,7 +376,6 @@ class PerformAnalysisOperation extends ServerOperation {
setCacheSize(context, IDLE_CACHE_SIZE);
server.sendContextAnalysisDoneNotifications(
context, AnalysisDoneReason.COMPLETE);
- _flushCache(server);
return;
}
// process results
@@ -392,28 +388,6 @@ class PerformAnalysisOperation extends ServerOperation {
}
/**
- * Flush some of the [context] cache results, which we probably not
- * going to use anymore.
- */
- void _flushCache(AnalysisServer server) {
- if (context is InternalAnalysisContext) {
- InternalAnalysisContext context = this.context;
- // Flush AST results for source outside of the analysis roots.
- ContextManager contextManager = server.contextManager;
- context.analysisCache.flush((target) {
- if (target is Source || target is LibrarySpecificUnit) {
- Source targetSource = target.source;
- return !context.prioritySources.contains(targetSource) &&
- !contextManager.isInAnalysisRoot(targetSource.fullName);
- }
- return false;
- }, (target, result) {
- return result is ResultDescriptor<CompilationUnit>;
- });
- }
- }
-
- /**
* Send the information in the given list of notices back to the client.
*/
void _sendNotices(AnalysisServer server, List<ChangeNotice> notices) {
« no previous file with comments | « no previous file | pkg/analysis_server/test/domain_completion_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698