diff --git a/src/com/google/javascript/jscomp/parsing/parser/Scanner.java b/src/com/google/javascript/jscomp/parsing/parser/Scanner.java
index <HASH>..<HASH> 100644
--- a/src/com/google/javascript/jscomp/parsing/parser/Scanner.java
+++ b/src/com/google/javascript/jscomp/parsing/parser/Scanner.java
@@ -682,7 +682,8 @@ public class Scanner {
       return new Token(Keywords.getTokenType(value), getTokenRange(beginToken));
     }
 
-    return new IdentifierToken(getTokenRange(beginToken), value);
+    // Intern the value to avoid creating lots of copies of the same string.
+    return new IdentifierToken(getTokenRange(beginToken), value.intern());
   }
 
   /**
Use String#intern when parsing so that we don't end up with lots of duplicate Strings on the heap for very common names like "goog" or "i".
-------------
Created by MOE: <URL>