Micro-optimization to try to right size the array

This commit is contained in:
Ryan Rupp
2025-01-21 18:28:21 -06:00
committed by Rob Winch
parent e670e13fdd
commit 53d1ed29b6

View File

@@ -907,7 +907,7 @@ public class JdbcIndexedSessionRepository implements
});
}
else {
List<Runnable> deltaActions = new ArrayList<>();
List<Runnable> deltaActions = JdbcSession.this.changed ? new ArrayList<>(4) : new ArrayList<>();
if (JdbcSession.this.changed) {
deltaActions.add(() -> {
Map<String, String> indexes = JdbcIndexedSessionRepository.this.indexResolver