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

Unified Diff: pkg/docgen/lib/src/models/indexable.dart

Issue 242453013: pkg/docgen: using consistently ordered maps for caching (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 8 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/docgen/lib/src/models/indexable.dart
diff --git a/pkg/docgen/lib/src/models/indexable.dart b/pkg/docgen/lib/src/models/indexable.dart
index 658f4d174e00048b983aff25e90521639356ea01..53441d01429cf55f8f9f7dd10f993e8554c503cf 100644
--- a/pkg/docgen/lib/src/models/indexable.dart
+++ b/pkg/docgen/lib/src/models/indexable.dart
@@ -4,6 +4,8 @@
library docgen.models.indexable;
+import 'dart:collection';
+
import 'package:markdown/markdown.dart' as markdown;
import '../exports/mirrors_util.dart' as dart2js_util;
@@ -50,7 +52,7 @@ abstract class Indexable<TMirror extends DeclarationMirror>
var mirrorQualifiedName = dart2js_util.qualifiedNameOf(this.mirror);
var map = _mirrorToDocgen.putIfAbsent(mirrorQualifiedName,
- () => new Map<String, Indexable>());
+ () => new HashMap<String, Indexable>());
var added = false;
map.putIfAbsent(owner.docName, () {
@@ -204,7 +206,7 @@ abstract class Indexable<TMirror extends DeclarationMirror>
/// issue. The second level map is indexed by owner docName for faster lookup.
/// Why two levels of lookup? Speed, man. Speed.
final Map<String, Map<String, Indexable>> _mirrorToDocgen =
- new Map<String, Map<String, Indexable>>();
+ new HashMap<String, Map<String, Indexable>>();
Iterable<Indexable> get allIndexables =>
_mirrorToDocgen.values.expand((map) => map.values);
« 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