-
-
Notifications
You must be signed in to change notification settings - Fork 444
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move integrations registration to background during init #3043
Move integrations registration to background during init #3043
Conversation
…age on SDK init: -AnrIntegration -PhoneStateBreadcrumbsIntegration -SystemEventsBreadcrumbsIntegration -TempSensorBreadcrumbsIntegration
Performance metrics 🚀
|
Revision | Plain | With Sentry | Diff |
---|---|---|---|
077a103 | 410.41 ms | 464.64 ms | 54.24 ms |
5295259 | 376.14 ms | 448.89 ms | 72.75 ms |
644ca6a | 448.52 ms | 547.22 ms | 98.70 ms |
2462226 | 400.98 ms | 477.18 ms | 76.20 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
077a103 | 1.72 MiB | 2.29 MiB | 578.27 KiB |
5295259 | 1.72 MiB | 2.29 MiB | 577.94 KiB |
644ca6a | 1.72 MiB | 2.29 MiB | 578.27 KiB |
2462226 | 1.72 MiB | 2.29 MiB | 578.43 KiB |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good, this will be a great step forward!
Similar to https://github.com/getsentry/sentry-java/pull/3036/files#r1393877541 I think we need to ensure thread safety within the Integrations, as different threads may modify the state at the same time.
# Conflicts: # CHANGELOG.md
…rations created a DeferredExecutorService for tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! In case we want to move more integrations to the background thread, we could think about having some base class integration, which takes care of thread safe start()
and close()
.
Nice job adapting the tests! 💯
* delete old profiles in the background on SDK init * moved some Integration.register() to the background using executorService * Move integrations registration to background during init (#3043) * removed integrations registration falling back to calling thread
📜 Description
moved several integrations to the background to reduce main thread usage on SDK init:
-AnrIntegration
-PhoneStateBreadcrumbsIntegration
-SystemEventsBreadcrumbsIntegration
-TempSensorBreadcrumbsIntegration
💡 Motivation and Context
Relates to #2222
It continues the work done on #3036
Fixes #3040
💚 How did you test it?
📝 Checklist
sendDefaultPII
is enabled.🔮 Next steps