mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-17 08:35:13 +00:00
HHH-10301 Don't allocate a new List if it is not required
This commit is contained in:
parent
2e8d52e654
commit
f4e58d342d
@ -211,6 +211,10 @@ public List performList(
|
||||
queryParametersToUse = queryParameters;
|
||||
}
|
||||
|
||||
//fast path to avoid unnecessary allocation and copying
|
||||
if ( translators.length == 1 ) {
|
||||
return translators[0].list( session, queryParametersToUse );
|
||||
}
|
||||
final int guessedResultSize = guessResultSize( rowSelection );
|
||||
final List combinedResults = new ArrayList( guessedResultSize );
|
||||
final IdentitySet distinction;
|
||||
|
Loading…
x
Reference in New Issue
Block a user