Commit 1916876
perf(core): Skip Hint allocation in addBreadcrumb (JAVA-605)
Only allocate a Hint when a beforeBreadcrumb callback is set. addBreadcrumb
previously allocated a Hint (HashMap + ArrayList + lock) on every call even
though the Hint is only ever passed to the callback, wasting allocations on
the common no-callback path.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent dfd01a3 commit 1916876
2 files changed
Lines changed: 7 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
16 | 20 | | |
17 | 21 | | |
18 | 22 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
493 | 493 | | |
494 | 494 | | |
495 | 495 | | |
496 | | - | |
497 | | - | |
498 | | - | |
499 | | - | |
500 | 496 | | |
501 | 497 | | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
502 | 501 | | |
503 | 502 | | |
504 | 503 | | |
| |||
0 commit comments