Various fixes to instrumentations running on the main thread#4039
Closed
Various fixes to instrumentations running on the main thread#4039
Conversation
Contributor
Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 00c8eeb | 415.32 ms | 428.08 ms | 12.76 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 00c8eeb | 1.70 MiB | 2.36 MiB | 671.98 KiB |
Previous results on branch: rz/fix/user-interaction-tracing
Startup times
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| add3e5a | 449.39 ms | 481.34 ms | 31.95 ms |
| 4e86894 | 429.12 ms | 479.11 ms | 49.99 ms |
| 95322cb | 410.15 ms | 489.38 ms | 79.23 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| add3e5a | 1.65 MiB | 2.31 MiB | 677.51 KiB |
| 4e86894 | 1.65 MiB | 2.31 MiB | 677.48 KiB |
| 95322cb | 1.65 MiB | 2.31 MiB | 677.51 KiB |
sentry/src/main/java/io/sentry/instrumentation/file/SentryFileInputStream.java
Show resolved
Hide resolved
| } | ||
|
|
||
| @Test | ||
| fun `when tracing is disabled does not instrument the stream`() { |
Contributor
There was a problem hiding this comment.
should we add the same test in SentryFileOutputStreamTest?
stefanosiano
approved these changes
Jan 10, 2025
Contributor
stefanosiano
left a comment
There was a problem hiding this comment.
just small details, but nice
stefanosiano
approved these changes
Jan 14, 2025
Member
Author
|
Superseded by #4051 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📜 Description
Here are just some preventive measure that will make less code/instructions to run on the main thread:
Window.Callbackto not be aSentryWindowCallbackalready to prevent multiple callbacks running simultaneouslyrequireNonNullcalls as they are redundant (we doinstanceofchecks later on anyway)Before
After
💡 Motivation and Context
Internal customer discussions
💚 How did you test it?
automated
📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps