HHH-6004 improved HashMap performance in StructuredCacheEntry

Conflicts:
	hibernate-core/src/main/java/org/hibernate/cache/spi/entry/StructuredCacheEntry.java
This commit is contained in:
Brett Meyer 2013-10-31 08:42:24 -04:00
parent 350171c8ba
commit 93c558046d
1 changed files with 1 additions and 1 deletions

View File

@ -62,7 +62,7 @@ public class StructuredCacheEntry implements CacheEntryStructure {
public Object structure(Object item) { public Object structure(Object item) {
CacheEntry entry = (CacheEntry) item; CacheEntry entry = (CacheEntry) item;
String[] names = persister.getPropertyNames(); String[] names = persister.getPropertyNames();
Map map = new HashMap(names.length+2); Map map = new HashMap( names.length + 3, 1f );
map.put( "_subclass", entry.getSubclass() ); map.put( "_subclass", entry.getSubclass() );
map.put( "_version", entry.getVersion() ); map.put( "_version", entry.getVersion() );
map.put( "_lazyPropertiesUnfetched", entry.areLazyPropertiesUnfetched() ); map.put( "_lazyPropertiesUnfetched", entry.areLazyPropertiesUnfetched() );