[JS IR IC] Implement fast path invalidation check
Compute library md5 hash and check it first with cached one. If hashes are equal it means that cache is up-to-date and no additional checks are needed - store library hashes (flat + trans) into cache info file - change invalidator return value
This commit is contained in:
@@ -208,7 +208,7 @@ class K2JsIrCompiler : CLICompiler<K2JSCompilerArguments>() {
|
||||
|
||||
val start = System.currentTimeMillis()
|
||||
|
||||
val updated = actualizeCacheForModule(
|
||||
val updateStatus = actualizeCacheForModule(
|
||||
includes,
|
||||
outputFilePath,
|
||||
configurationJs,
|
||||
@@ -218,13 +218,10 @@ class K2JsIrCompiler : CLICompiler<K2JSCompilerArguments>() {
|
||||
::buildCacheForModuleFiles
|
||||
)
|
||||
|
||||
if (updated) {
|
||||
messageCollector.report(INFO, "IC per-file cache building duration: ${System.currentTimeMillis() - start}ms")
|
||||
if (updateStatus.upToDate) {
|
||||
messageCollector.report(INFO, "IC per-file cache up-to-date check duration: ${System.currentTimeMillis() - start}ms")
|
||||
} else {
|
||||
messageCollector.report(
|
||||
INFO,
|
||||
"IC per-file cache up-to-date check duration: ${System.currentTimeMillis() - start}ms"
|
||||
)
|
||||
messageCollector.report(INFO, "IC per-file cache building duration: ${System.currentTimeMillis() - start}ms")
|
||||
}
|
||||
return OK
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user