mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Revert "[indexing] IJPL-207117 Schedule scanning synchronously from ProjectFileBasedIndexStartupActivity to make sure that smartReadAction waits for the first scanning"
This reverts commit 5174b49bdf7ec50d8a815dc028f568a9436970c3. GitOrigin-RevId: 15f57fda445c93779042053628ee65e55afa9bfc
This commit is contained in:
committed by
intellij-monorepo-bot
parent
331d5b2dbd
commit
278fba7b9b
@@ -6,7 +6,6 @@ import com.intellij.openapi.application.readAction
|
||||
import com.intellij.openapi.application.readActionBlocking
|
||||
import com.intellij.openapi.project.Project
|
||||
import com.intellij.openapi.util.Key
|
||||
import com.intellij.openapi.util.ThrowableComputable
|
||||
import com.intellij.openapi.util.registry.Registry
|
||||
import com.intellij.openapi.vfs.VirtualFile
|
||||
import com.intellij.openapi.vfs.VirtualFileWithId
|
||||
@@ -146,15 +145,11 @@ private fun scheduleFullScanning(
|
||||
}
|
||||
else CompletableDeferred(Unit)
|
||||
val parameters = CompletableDeferred(ScanningIterators(indexingReason, null, null, fullScanningType))
|
||||
ApplicationManager.getApplication().invokeAndWait {
|
||||
ApplicationManager.getApplication().runWriteIntentReadAction(ThrowableComputable { // makes scanning to be scheduled immediately
|
||||
UnindexedFilesScanner(project, true, isFilterUpToDate,
|
||||
someDirtyFilesScheduledForIndexing.asCompletableFuture(),
|
||||
forceCheckingForOutdatedIndexesUsingFileModCount = notSeenIds !is AllNotSeenDirtyFileIds,
|
||||
scanningParameters = parameters)
|
||||
.queue()
|
||||
})
|
||||
}
|
||||
UnindexedFilesScanner(project, true, isFilterUpToDate,
|
||||
someDirtyFilesScheduledForIndexing.asCompletableFuture(),
|
||||
forceCheckingForOutdatedIndexesUsingFileModCount = notSeenIds !is AllNotSeenDirtyFileIds,
|
||||
scanningParameters = parameters)
|
||||
.queue()
|
||||
return someDirtyFilesScheduledForIndexing
|
||||
}
|
||||
|
||||
@@ -178,14 +173,10 @@ private fun scheduleDirtyFilesScanning(
|
||||
DirtyFilesIndexableFilesIterator(projectDirtyFilesFromOrphanQueue, true))
|
||||
|
||||
val scanningIterators = CompletableDeferred(ScanningIterators(indexingReason, iterators, null, partialScanningType))
|
||||
ApplicationManager.getApplication().invokeAndWait {
|
||||
ApplicationManager.getApplication().runWriteIntentReadAction(ThrowableComputable { // makes scanning to be scheduled immediately
|
||||
UnindexedFilesScanner(project, true, true,
|
||||
projectDirtyFiles.asCompletableFuture(),
|
||||
scanningParameters = scanningIterators)
|
||||
.queue()
|
||||
})
|
||||
}
|
||||
UnindexedFilesScanner(project, true, true,
|
||||
projectDirtyFiles.asCompletableFuture(),
|
||||
scanningParameters = scanningIterators)
|
||||
.queue()
|
||||
return projectDirtyFiles
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user