# Fixing the Initial Dispatchers.Main Delay in Kotlin Coroutines

DevFeed: [Fixing the Initial Dispatchers.Main Delay in Kotlin Coroutines](<https://devfeed.tech/articles/a-dispatcher-of-many-threads-37550.md>)

Original publisher: [Read original article](<https://colintheshots.com/writing/a-dispatcher-of-many-threads-part-1-2/>)

Published: 2019-12-19T03:02:18Z

Content type: tutorial

Language: en

Sources: [Colin The Shots](<https://devfeed.tech/sources/colin-the-shots.md>)

Topics: [Coroutines](<https://devfeed.tech/topics/coroutines.md>), [kotlin-coroutines](<https://devfeed.tech/topics/kotlin-coroutines.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Android](<https://devfeed.tech/topics/android.md>), [R8](<https://devfeed.tech/topics/r8.md>), [Optimization](<https://devfeed.tech/topics/optimization.md>), [Android Studio](<https://devfeed.tech/topics/android-studio.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-studio](<https://devfeed.tech/tags/android-studio.md>), [builds](<https://devfeed.tech/tags/builds.md>), [coroutines](<https://devfeed.tech/tags/coroutines.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [kotlin-coroutines](<https://devfeed.tech/tags/kotlin-coroutines.md>), [optimization](<https://devfeed.tech/tags/optimization.md>), [r8](<https://devfeed.tech/tags/r8.md>)

## AI overview

This article explains an initial delay of up to a quarter second when Android apps first use Kotlin Coroutines' Dispatchers.Main. It attributes the delay to ServiceLoader triggering a checksum of the entire JAR inside the APK and describes a stable fix using Kotlin coroutines 1.3.3 or higher, required Proguard rules, and R8 optimization.

## Source excerpt

Kotlin Coroutines have been almost unanimously received with applause by the Android software development community. However, there are some significant issues I have noticed in practice that are