mirror of
https://github.com/null2264/yokai.git
synced 2025-06-21 10:44:42 +00:00
enhance: Limit parallelism for Coil image loading
REF: https://www.reddit.com/r/androiddev/comments/xbeizp/comment/io4ytdv/ Co-authored-by: ivaniskandar <ivaniskandar@users.noreply.github.com>
This commit is contained in:
parent
5785550e75
commit
859674681a
1 changed files with 4 additions and 0 deletions
|
@ -54,6 +54,7 @@ import eu.kanade.tachiyomi.util.system.AuthenticatorUtil
|
||||||
import eu.kanade.tachiyomi.util.system.launchIO
|
import eu.kanade.tachiyomi.util.system.launchIO
|
||||||
import eu.kanade.tachiyomi.util.system.localeContext
|
import eu.kanade.tachiyomi.util.system.localeContext
|
||||||
import eu.kanade.tachiyomi.util.system.notification
|
import eu.kanade.tachiyomi.util.system.notification
|
||||||
|
import kotlinx.coroutines.Dispatchers
|
||||||
import kotlinx.coroutines.flow.launchIn
|
import kotlinx.coroutines.flow.launchIn
|
||||||
import kotlinx.coroutines.flow.onEach
|
import kotlinx.coroutines.flow.onEach
|
||||||
import org.conscrypt.Conscrypt
|
import org.conscrypt.Conscrypt
|
||||||
|
@ -263,6 +264,9 @@ open class App : Application(), DefaultLifecycleObserver, SingletonImageLoader.F
|
||||||
if (BuildConfig.DEBUG) {
|
if (BuildConfig.DEBUG) {
|
||||||
logger(DebugLogger())
|
logger(DebugLogger())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fetcherCoroutineContext(Dispatchers.IO.limitedParallelism(8))
|
||||||
|
decoderCoroutineContext(Dispatchers.IO.limitedParallelism(3))
|
||||||
}
|
}
|
||||||
.build()
|
.build()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue