-
Notifications
You must be signed in to change notification settings - Fork 428
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
FR: Run Logged Exception Handling Off Thread #860
Comments
Hey thank you for the feedback. We don't have a good way to do this right now because customers usually want a guarantee that crash reports are sent in order with their logs / custom keys. If this becomes async we've seen cases where logs and custom keys are out of order. But the 15ms can be really bad for a game, so we'll take a look at this feature request and figure out whether to take it on. |
For reference this is how I've worked around this, given the Unity source isn't available. Add a post build script to modify the code generated by the plugin to prevent it from adding listeners to handle errors / crashes.
This isn't going to be a stable solution and is subject to breaking with library changes, but it works well enough. Then you need to add your own listeners and process them off the main thread:
|
Feature proposal
When the
Firebase.Crashlytics.LoggedException
class is created it runs a lot of Regex matches on the stacktrace. This can take several milliseconds, 15ms on an iPhone 8 in an example I profiled.Firebase.Crashlytics.ExceptionHandler
registers a listener toApplication.logMessageReceived
on app startup and creates an instance of that LoggedException for every logged exception on the main thread. This can create a frame spike in our application.In our application we also forward logged error messages to
Firebase.Crashlytics.Crashlytics.LogException
by listening toApplication.logMessageReceived
, but we push those messages off the main thread and trigger the logging from there. That appears to work without issues, so I'm assuming all the supporting infrastructure is thread safe.Ideally there would be an option to either:
The text was updated successfully, but these errors were encountered: