sentry-java
sentry-java copied to clipboard
Avoid stopping appStartProfiler after application creation
:scroll: Description
AppStartMetrics stops appStartProfiler only if no activity ever started
:bulb: Motivation and Context
We were always stopping appStartProfiler after application creation. Not a real issue, as the profiler should already be detatched from AppStartMetrics at that point.
:green_heart: How did you test it?
Unit test
: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 | 451.55 ms | 452.46 ms | 0.91 ms |
| Size | 1.70 MiB | 2.35 MiB | 660.81 KiB |
Previous results on branch: fix/app-start-profiler-avoid-stop
Startup times
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 0fe51fcfcd9884de0c05c286be3e9e0ecb7b54af | 391.55 ms | 460.24 ms | 68.69 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 0fe51fcfcd9884de0c05c286be3e9e0ecb7b54af | 1.70 MiB | 2.35 MiB | 659.90 KiB |