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

Unified Diff: pkg/analysis_services/lib/src/index/store/split_store.dart

Issue 399723003: Improve Dart master index selectivity. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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
Index: pkg/analysis_services/lib/src/index/store/split_store.dart
diff --git a/pkg/analysis_services/lib/src/index/store/split_store.dart b/pkg/analysis_services/lib/src/index/store/split_store.dart
index dca567d2fbd6f65ffa7387ba109de6d3e3f767c1..5a81f594e2b235c5ddf7e5419142324f47b78113 100644
--- a/pkg/analysis_services/lib/src/index/store/split_store.dart
+++ b/pkg/analysis_services/lib/src/index/store/split_store.dart
@@ -640,8 +640,7 @@ class SplitIndexStore implements IndexStore {
return new Future.value(locations);
}
// prepare node names
- String name = _getElementName(element);
- int nameId = _stringCodec.encode(name);
+ int nameId = _elementCodec.encodeHash(element);
List<int> nodeNameIds = _nameToNodeNames.get(nameId);
// prepare Future(s) for reading each IndexNode
List<Future<List<Location>>> nodeFutures = <Future<List<Location>>>[];
@@ -798,8 +797,7 @@ class SplitIndexStore implements IndexStore {
}
void _recordNodeNameForElement(Element element) {
- String name = _getElementName(element);
- int nameId = _stringCodec.encode(name);
+ int nameId = _elementCodec.encodeHash(element);
_nameToNodeNames.add(nameId, _currentNodeNameId);
}
« no previous file with comments | « pkg/analysis_services/lib/src/index/store/codec.dart ('k') | pkg/analysis_services/test/index/store/codec_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698