sentry-java
sentry-java copied to clipboard
[QA] Avoid collecting normal frames
:scroll: Description
avoid keeping normal frames in memory when collecting slow/frozen frames
:bulb: Motivation and Context
We were keeping a lot of useless frames in memory, without using them. This means that when a span finishes, we were iterating and then cleaning a lot more items than necessary.
:green_heart: How did you test it?
Unit tests
:pencil: Checklist
- [ ] I reviewed the submitted code.
- [ ] I added tests to verify the changes.
- [ ] No new PII added or SDK only sends newly added PII if
sendDefaultPIIis enabled. - [ ] I updated the docs if needed.
- [ ] Review from the native team if needed.
- [ ] No breaking change or entry added to the changelog.
- [ ] No breaking change for hybrid SDKs or communicated to hybrid SDKs.
:crystal_ball: Next steps
Performance metrics :rocket:
| Plain | With Sentry | Diff | |
|---|---|---|---|
| Startup time | 647.00 ms | 723.98 ms | 76.98 ms |
| Size | 1.70 MiB | 2.35 MiB | 668.88 KiB |
Previous results on branch: fix/avoid-collecting-normal-frames
Startup times
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| da18d4baf40805518e71e0f46a444c7acbb40b04 | 220.96 ms | 223.94 ms | 2.98 ms |
| 898aba2a1ebafdce03446e3736b9502bb851c442 | 425.35 ms | 445.41 ms | 20.05 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| da18d4baf40805518e71e0f46a444c7acbb40b04 | 1.70 MiB | 2.35 MiB | 667.43 KiB |
| 898aba2a1ebafdce03446e3736b9502bb851c442 | 1.70 MiB | 2.35 MiB | 668.03 KiB |
@markushi wanna look again?