HHH-14305 Reduce memory consumption of AbstractEntityPersister#attributeDefinitions

This commit is contained in:
Sanne Grinovero 2020-10-29 16:06:15 +00:00
parent 35c7928e76
commit c7f87b0c2a
1 changed files with 2 additions and 3 deletions

View File

@ -5950,9 +5950,8 @@ public abstract class AbstractEntityPersister
// }
// }
this.attributeDefinitions = Collections.unmodifiableList(
new ArrayList<>( attributeDefinitionsByName.values() )
);
this.attributeDefinitions = CollectionHelper.toSmallList( new ArrayList<>( attributeDefinitionsByName.values() ) );
// // todo : leverage the attribute definitions housed on EntityMetamodel
// // for that to work, we'd have to be able to walk our super entity persister(s)
// this.attributeDefinitions = new Iterable<AttributeDefinition>() {