Skip to content

FR: Run Logged Exception Handling Off Thread #860

Open
@allan-o3h

Description

@allan-o3h

Feature proposal

  • Firebase Component: Crashlytics

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.

image

Firebase.Crashlytics.ExceptionHandler registers a listener to Application.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 to Application.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:

  1. Not have the ExceptionHandler register the logMessageReceived handler so we could manually push in the exceptions off thread
  2. Have the ExceptionHandler process the exceptions off the main thread.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions