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

Unified Diff: editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/index/Resource.java

Issue 12571002: Intern AST and Model names to reduce char[]/String waste. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 9 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: editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/index/Resource.java
diff --git a/editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/index/Resource.java b/editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/index/Resource.java
index eefb765a9bf6e85fccaf97173db53f609e6c666f..7bd8088ff4864cecb76c3553f853c82f965c67ec 100644
--- a/editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/index/Resource.java
+++ b/editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/index/Resource.java
@@ -13,6 +13,8 @@
*/
package com.google.dart.tools.core.index;
+import com.google.dart.compiler.util.StringInterner;
+
/**
* Instances of the class <code>Resource</code> represent a resource that contains elements.
* Resources conceptually correspond to files, but are not required to be actual files in a file
@@ -30,7 +32,7 @@ public final class Resource {
* @param resourceId the globally unique identifier for this resource
*/
public Resource(String resourceId) {
- this.resourceId = resourceId;
+ this.resourceId = StringInterner.intern(resourceId);
}
@Override

Powered by Google App Engine
This is Rietveld 408576698