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

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

Issue 720543002: First fix for indexing slowness. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 1 month 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/generated/source_io.dart
diff --git a/pkg/analyzer/lib/src/generated/source_io.dart b/pkg/analyzer/lib/src/generated/source_io.dart
index b5f02e82e564224d1a87657364d4da99cc196048..b7ec971bd2bb3445f924400449e8c9876d238732 100644
--- a/pkg/analyzer/lib/src/generated/source_io.dart
+++ b/pkg/analyzer/lib/src/generated/source_io.dart
@@ -94,6 +94,11 @@ class FileBasedSource implements Source {
final JavaFile file;
/**
+ * The cached absolute path of this source.
+ */
+ String _absolutePath;
+
+ /**
* The cached encoding for this source.
*/
String _encoding;
@@ -138,7 +143,12 @@ class FileBasedSource implements Source {
}
@override
- String get fullName => file.getAbsolutePath();
+ String get fullName {
+ if (_absolutePath == null) {
+ _absolutePath = file.getAbsolutePath();
+ }
+ return _absolutePath;
+ }
@override
int get modificationStamp => file.lastModified();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698