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

Unified Diff: pkg/analyzer/lib/src/task/dart_work_manager.dart

Issue 2155023002: Don't schedule SOURCE_KIND computation when it is know already. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 5 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/analyzer/test/src/task/dart_work_manager_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/task/dart_work_manager.dart
diff --git a/pkg/analyzer/lib/src/task/dart_work_manager.dart b/pkg/analyzer/lib/src/task/dart_work_manager.dart
index 3d6dc3375e1ee50ab55b63c6de1c55f1212a3d63..6b2a96ecc7c2a8344667bf150b9b92ab4159e2e2 100644
--- a/pkg/analyzer/lib/src/task/dart_work_manager.dart
+++ b/pkg/analyzer/lib/src/task/dart_work_manager.dart
@@ -117,7 +117,10 @@ class DartWorkManager implements WorkManager {
void applyChange(List<Source> addedSources, List<Source> changedSources,
List<Source> removedSources) {
addedSources = addedSources.where(_isDartSource).toList();
- changedSources = changedSources.where(_isDartSource).toList();
+ changedSources = changedSources
+ .where(_isDartSource)
+ .where((source) => _needsComputing(source, SOURCE_KIND))
+ .toList();
removedSources = removedSources.where(_isDartSource).toList();
// unknown queue
unknownSourceQueue.addAll(addedSources);
« no previous file with comments | « no previous file | pkg/analyzer/test/src/task/dart_work_manager_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698