[IR] Optimize a few hot spots to reduce total CPU time

^KT-61121
This commit is contained in:
Mark Mann
2023-08-09 18:35:45 +02:00
committed by Space Team
parent 83a70ddf8b
commit 8a31e2ed82
12 changed files with 53 additions and 30 deletions
@@ -28,8 +28,9 @@ data class File constructor(internal val javaPath: Path) {
get() = javaPath.toAbsolutePath().toString()
val absoluteFile: File
get() = File(absolutePath)
val canonicalPath: String
get() = javaPath.toFile().canonicalPath
val canonicalPath: String by lazy {
javaPath.toFile().canonicalPath
}
val canonicalFile: File
get() = File(canonicalPath)