-
-
Notifications
You must be signed in to change notification settings - Fork 435
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
Offload NDK Scope sync to background thread #3046
Comments
Let's be aware if the sync happens on a background thread, the data won't be available immediately on the NDK side. E.g. when next line in code performs JNI call. |
Let's talk about this in the next sentry-native sync. |
Let's check the top-level attributes in the data bag: If it's only primitives sync the breadcrumbs directly, otherwise offload to a background thread. |
Let's also profile/compare the timings of syncing this with only primitives. If it's quick enough we could still do that on the main thread, otherwise offload to a bg thread |
Problem Statement
As of now any context data (user, breadcrumb, tags, ...) is synced to
sentry-native
on the calling thread. The calling thread might be the main thread, which is not optimal.Solution Brainstorm
We should offload the scope sync to a background thread, ensuring we're not spending too much time on the main thread.
The text was updated successfully, but these errors were encountered: