-
Notifications
You must be signed in to change notification settings - Fork 41.5k
Commit f22845d
Remove unused SHA-1 hash from UNPACK markers
In BootZipCopyAction and AbstractJarWriter, SHA-1 hash is calculated for
stored entries requiring unpack and set as entry comment. However, the
hash isn't used anywhere, just the marker prefix 'UNPACK:' is checked.
This commit removes the unnecessary SHA-1 hash calculation which reads
the file completely in memory, potentially three times in extreme cases.
Now the comment is simply set to 'UNPACK:' without any hash, improving
performance.
Fixes gh-46183
Signed-off-by: Hyunjoon Choi <hyunjoon@example.com>1 parent 81a4a33 commit f22845d
File tree
3 files changed
+9
-40
lines changed- build-plugin/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/bundling
- loader/spring-boot-loader-tools/src
- main/java/org/springframework/boot/loader/tools
- test/java/org/springframework/boot/loader/tools
3 files changed
+9
-40
lines changedLines changed: 4 additions & 19 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
22 | 22 |
| |
23 | 23 |
| |
24 | 24 |
| |
25 | - | ||
26 | - | ||
27 | 25 |
| |
28 | 26 |
| |
29 | 27 |
| |
30 | 28 |
| |
31 | - | ||
32 | 29 |
| |
33 | 30 |
| |
34 | 31 |
| |
| |||
578 | 575 |
| |
579 | 576 |
| |
580 | 577 |
| |
581 | - | ||
578 | + | ||
582 | 579 |
| |
583 | 580 |
| |
584 | 581 |
| |
585 | 582 |
| |
586 | 583 |
| |
587 | 584 |
| |
588 | - | ||
585 | + | ||
589 | 586 |
| |
590 | 587 |
| |
591 | 588 |
| |
592 | 589 |
| |
593 | 590 |
| |
594 | - | ||
595 | - | ||
596 | - | ||
597 | - | ||
598 | - | ||
599 | - | ||
600 | - | ||
601 | - | ||
602 | - | ||
603 | 591 |
| |
604 | 592 |
| |
605 | 593 |
| |
606 | 594 |
| |
607 | 595 |
| |
608 | - | ||
609 | - | ||
610 | - | ||
611 | 596 |
| |
612 | 597 |
| |
613 | 598 |
| |
| |||
617 | 602 |
| |
618 | 603 |
| |
619 | 604 |
| |
620 | - | ||
621 | - | ||
605 | + | ||
606 | + | ||
622 | 607 |
| |
623 | 608 |
| |
624 | 609 |
| |
|
Lines changed: 4 additions & 19 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
24 | 24 |
| |
25 | 25 |
| |
26 | 26 |
| |
27 | - | ||
28 | - | ||
29 | 27 |
| |
30 | 28 |
| |
31 | 29 |
| |
32 | - | ||
33 | 30 |
| |
34 | 31 |
| |
35 | 32 |
| |
| |||
320 | 317 |
| |
321 | 318 |
| |
322 | 319 |
| |
323 | - | ||
320 | + | ||
324 | 321 |
| |
325 | 322 |
| |
326 | 323 |
| |
327 | 324 |
| |
328 | 325 |
| |
329 | 326 |
| |
330 | - | ||
327 | + | ||
331 | 328 |
| |
332 | 329 |
| |
333 | 330 |
| |
334 | 331 |
| |
335 | 332 |
| |
336 | - | ||
337 | - | ||
338 | - | ||
339 | - | ||
340 | - | ||
341 | - | ||
342 | - | ||
343 | - | ||
344 | - | ||
345 | 333 |
| |
346 | 334 |
| |
347 | 335 |
| |
348 | 336 |
| |
349 | 337 |
| |
350 | - | ||
351 | - | ||
352 | - | ||
353 | 338 |
| |
354 | 339 |
| |
355 | 340 |
| |
| |||
359 | 344 |
| |
360 | 345 |
| |
361 | 346 |
| |
362 | - | ||
363 | - | ||
347 | + | ||
348 | + | ||
364 | 349 |
| |
365 | 350 |
| |
366 | 351 |
| |
|
Lines changed: 1 addition & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
208 | 208 |
| |
209 | 209 |
| |
210 | 210 |
| |
211 | - | ||
212 | - | ||
211 | + | ||
213 | 212 |
| |
214 | 213 |
| |
215 | 214 |
| |
|
0 commit comments