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

Unified Diff: pkg/analyzer/lib/src/context/context.dart

Issue 1151563004: Optimize AnalysisContext.getSourcesWithFullName(). (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: rebase Created 5 years, 7 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/cache.dart ('k') | pkg/analyzer/test/src/context/cache_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/context/context.dart
diff --git a/pkg/analyzer/lib/src/context/context.dart b/pkg/analyzer/lib/src/context/context.dart
index ebf393dc72197d54ca7841a59f6de9efca32ef6f..45f6abbb286a1afc03cca61c85b9a979373193eb 100644
--- a/pkg/analyzer/lib/src/context/context.dart
+++ b/pkg/analyzer/lib/src/context/context.dart
@@ -935,13 +935,7 @@ class AnalysisContextImpl implements InternalAnalysisContext {
@override
List<Source> getSourcesWithFullName(String path) {
- List<Source> sources = <Source>[];
- for (Source source in _cache.sources) {
- if (source.fullName == path) {
- sources.add(source);
- }
- }
- return sources;
+ return analysisCache.getSourcesWithFullName(path);
}
@override
« no previous file with comments | « pkg/analyzer/lib/src/context/cache.dart ('k') | pkg/analyzer/test/src/context/cache_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698