HHH-13723 Hint sizing of ArrayList in ResultSetProcessingContextImpl

This commit is contained in:
Sanne Grinovero 2019-11-04 12:09:00 +00:00
parent 87441781c6
commit 66515a2e4e
1 changed files with 2 additions and 1 deletions

View File

@ -281,8 +281,9 @@ public class ResultSetProcessingContextImpl implements ResultSetProcessingContex
// managing the running list of registrations ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
final int sizeHint = currentRowHydratedEntityRegistrationList.size();
if ( hydratedEntityRegistrationList == null ) {
hydratedEntityRegistrationList = new ArrayList<>();
hydratedEntityRegistrationList = new ArrayList<>( sizeHint );
}
hydratedEntityRegistrationList.addAll( currentRowHydratedEntityRegistrationList );