Skip to content

CoroutineExceptionHandler creation takes longer than expected > 100ms #4354

@HeroOussama

Description

@HeroOussama

Describe the bug

The creation of CoroutineExceptionHandler takes around 100ms which is causing a delay in calling our API's

val exceptionHandler = CoroutineExceptionHandler { _, exception ->
       pagingStateLiveData.postValue(QcResult.Error(exception))
   }
val start = System.currentTimeMillis()
coroutineScope.launch(exceptionHandler) {
             println("It took ${System.currentTimeMillis() - start} ms")
}

Lib version
1.7.3

Provide a Reproducer

  • to reproduce it just create an empty CoroutineExceptionHandler and set a start and end timer. and observe.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions