Dont call GC for every task
This commit is contained in:
committed by
Space Team
parent
a43a16b25b
commit
730502638a
@@ -80,6 +80,7 @@ interface CompileService : Remote {
|
|||||||
@Throws(RemoteException::class)
|
@Throws(RemoteException::class)
|
||||||
fun checkCompilerId(expectedCompilerId: CompilerId): Boolean
|
fun checkCompilerId(expectedCompilerId: CompilerId): Boolean
|
||||||
|
|
||||||
|
//Call with [withGC=true] can cause performance issue
|
||||||
@Throws(RemoteException::class)
|
@Throws(RemoteException::class)
|
||||||
fun getUsedMemory(withGC: Boolean = true): CallResult<Long>
|
fun getUsedMemory(withGC: Boolean = true): CallResult<Long>
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -213,7 +213,7 @@ internal class GradleKotlinCompilerWork @Inject constructor(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
val memoryUsageBeforeBuild = daemon.getUsedMemory(withGC = true).takeIf { it.isGood }?.get()
|
val memoryUsageBeforeBuild = daemon.getUsedMemory(withGC = false).takeIf { it.isGood }?.get()
|
||||||
|
|
||||||
val targetPlatform = when (compilerClassName) {
|
val targetPlatform = when (compilerClassName) {
|
||||||
KotlinCompilerClass.JVM -> CompileService.TargetPlatform.JVM
|
KotlinCompilerClass.JVM -> CompileService.TargetPlatform.JVM
|
||||||
|
|||||||
Reference in New Issue
Block a user