Skip to content

Commit ff376cc

Browse files
author
Fedorov, Mikhail
committed
Fix performance bug with large number of unnamed parameters
On some occasions where col in (:args) contain a really lot args, 10k+ for instance, this commit fixes a performance (high CPU) bug by NOT traversing the whole map in basically O(n^2) manner Signed-off-by: Mikhail Fedorov <[email protected]>
1 parent 6a53af3 commit ff376cc

File tree

1 file changed

+1
-0
lines changed
  • spring-data-jdbc/src/main/java/org/springframework/data/jdbc/core/convert

1 file changed

+1
-0
lines changed

spring-data-jdbc/src/main/java/org/springframework/data/jdbc/core/convert/QueryMapper.java

+1
Original file line numberDiff line numberDiff line change
@@ -638,6 +638,7 @@ private static String getUniqueName(MapSqlParameterSource parameterSource, Strin
638638
do {
639639
uniqueName = name + (counter++);
640640
} while (values.containsKey(uniqueName));
641+
641642
return uniqueName;
642643
}
643644

0 commit comments

Comments
 (0)