Byron Katz
03/28/2021, 9:19 PM- executorService: ExecutorService = Executors.newCachedThreadPool(Executors.defaultThreadFactory())
+ executorService: ExecutorService = Executors.newCachedThreadPool(Executors.defaultThreadFactory()).asCoroutineDispatcher().executor as ExecutorService,
and bam! Performance up by 40% on my heaviest function.elizarov
03/29/2021, 6:16 AMByron Katz
03/29/2021, 1:37 PMelizarov
03/29/2021, 1:41 PMval originalExecutor = Executors.newCachedThreadPool(Executors.defaultThreadFactory())
val resultingExecutor = originalExecutor.asCoroutineDispatcher().executor as ExecutorService
println(resultingExecutor === originalExecutor) // prints true
Byron Katz
03/29/2021, 1:42 PMByron Katz
03/29/2021, 1:42 PMelizarov
03/29/2021, 1:43 PMByron Katz
03/29/2021, 1:44 PMfoo.submit ()
elizarov
03/29/2021, 1:44 PMByron Katz
03/29/2021, 1:46 PMelizarov
03/29/2021, 1:47 PMByron Katz
03/29/2021, 1:47 PMByron Katz
03/29/2021, 1:47 PMByron Katz
03/29/2021, 5:24 PM