mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-20 05:21:29 +07:00
git: cleanup - use utility method
GitOrigin-RevId: 32134d8860f8e383c0eebe4ace3410c2f3eabc8d
This commit is contained in:
committed by
intellij-monorepo-bot
parent
8d27d59f3d
commit
613a93d239
@@ -14,6 +14,7 @@ import com.intellij.openapi.vfs.VfsUtil.markDirtyAndRefresh
|
||||
import com.intellij.openapi.vfs.VirtualFile
|
||||
import org.jetbrains.annotations.NonNls
|
||||
import java.io.File
|
||||
import kotlin.system.measureTimeMillis
|
||||
|
||||
interface FilePathChange {
|
||||
val beforePath: FilePath?
|
||||
@@ -79,13 +80,13 @@ object RefreshVFsSynchronously {
|
||||
}
|
||||
|
||||
private fun markDirtyAndRefresh(isRecursive: Boolean, files: Collection<VirtualFile>) {
|
||||
val start = System.currentTimeMillis()
|
||||
runWithProgressText {
|
||||
markDirtyAndRefresh(false, isRecursive, false, *files.toTypedArray())
|
||||
val time = measureTimeMillis {
|
||||
runWithProgressText {
|
||||
markDirtyAndRefresh(false, isRecursive, false, *files.toTypedArray())
|
||||
}
|
||||
}
|
||||
val end = System.currentTimeMillis()
|
||||
if (TIME_LOG.isDebugEnabled) {
|
||||
TIME_LOG.debug("VFS refresh took ${end - start}ms, ${files.size} files, isRecursive=$isRecursive")
|
||||
TIME_LOG.debug("VFS refresh took ${time}ms, ${files.size} files, isRecursive=$isRecursive")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user