Commit d64d60a
Optimize StringBuilder initialization in CorrelationIdFormatter
Initialize StringBuilder with the expected capacity (this.blank.length())
to avoid unnecessary resizing and array copying during string construction.
The blank field already contains the exact length needed for the formatted
output, making it an ideal initial capacity. This improves performance for
correlation ID formatting, which is frequently called during logging
operations.
See gh-48125
Signed-off-by: gobeomjun <alap_u@naver.com>1 parent fe07ad8 commit d64d60a
File tree
1 file changed
+1
-1
lines changed- spring-boot-project/spring-boot/src/main/java/org/springframework/boot/logging
1 file changed
+1
-1
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
88 | | - | |
| 88 | + | |
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
| |||
0 commit comments