Skip to content

Commit

Permalink
Remove intern calls on FieldMapper#Names
Browse files Browse the repository at this point in the history
remove internal callas on FieldMappers#Names, we properly reuse FieldMapper, so there is no need to try and call intern in order to reuse the names. This can be heavy with many fields and continuous mapping parsing.
closes #6747
  • Loading branch information
kimchy committed Jul 8, 2014
1 parent 3da1c46 commit 540c722
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/main/java/org/elasticsearch/index/mapper/FieldMapper.java
Expand Up @@ -66,11 +66,11 @@ public Names(String name, String indexName, String indexNameClean, String fullNa
}

public Names(String name, String indexName, String indexNameClean, String fullName, @Nullable String sourcePath) {
this.name = name.intern();
this.indexName = indexName.intern();
this.indexNameClean = indexNameClean.intern();
this.fullName = fullName.intern();
this.sourcePath = sourcePath == null ? this.fullName : sourcePath.intern();
this.name = name;
this.indexName = indexName;
this.indexNameClean = indexNameClean;
this.fullName = fullName;
this.sourcePath = sourcePath == null ? this.fullName : sourcePath;
}

/**
Expand Down

0 comments on commit 540c722

Please sign in to comment.