Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IgnoreManager$bulkFileListener$1.handleEvent$lambda$1 freezes UI thread due to slow call of BufferedInputStream.rea #908

Closed
ViugiNick opened this issue Jun 2, 2024 · 3 comments
Assignees
Milestone

Comments

@ViugiNick
Copy link

Android Studio Koala|2024.1.1 Beta 2

com.intellij.openapi.application.TransactionGuardImpl$1.run(TransactionGuardImpl.java:191) [59200ms]
com.intellij.openapi.application.TransactionGuardImpl.access$100(TransactionGuardImpl.java:22) [59200ms]
com.intellij.openapi.application.TransactionGuardImpl.runWithWritingAllowed(TransactionGuardImpl.java:209) [59200ms]
com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission$$Lambda$2457/0x000000080168b360.run(Unknown Source) [59200ms]
com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.lambda$safeTransferToEdt$7(NonBlockingReadActionImpl.java:728) [59200ms]
com.intellij.openapi.vfs.newvfs.RefreshQueueImpl$$Lambda$6470/0x00000008035aeae0.accept(Unknown Source) [59200ms]
com.intellij.openapi.vfs.newvfs.RefreshQueueImpl.lambda$queueSession$2(RefreshQueueImpl.java:113) [59200ms]
com.intellij.openapi.vfs.newvfs.RefreshSessionImpl.fireEvents(RefreshSessionImpl.java:218) [59200ms]
com.intellij.openapi.application.impl.ApplicationImpl.runWriteActionWithNonCancellableProgressInDispatchThread(ApplicationImpl.java:869) [59200ms]
com.intellij.openapi.application.impl.RwLockHolder.runWriteActionWithNonCancellableProgressInDispatchThread(RwLockHolder.kt:413) [59200ms]
com.intellij.openapi.application.impl.RwLockHolder.runEdtProgressWriteAction(RwLockHolder.kt:429) [59200ms]
com.intellij.openapi.application.impl.RwLockHolder.runWriteActionWithClass(RwLockHolder.kt:440) [59200ms]
com.intellij.openapi.application.impl.RwLockHolder$$Lambda$6502/0x00000008035d4b10.compute(Unknown Source) [59200ms]
com.intellij.openapi.application.impl.RwLockHolder.runEdtProgressWriteAction$lambda$2(RwLockHolder.kt:431) [59200ms]
com.intellij.openapi.progress.util.PotemkinProgress.runInSwingThread(PotemkinProgress.java:156) [59200ms]
com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:202) [59200ms]
com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:79) [59200ms]
com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:659) [59200ms]
com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:691) [59200ms]
com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:735) [59200ms]
com.intellij.openapi.progress.impl.CoreProgressManager$$Lambda$1332/0x0000000800f09708.compute(Unknown Source) [59200ms]
com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$13(CoreProgressManager.java:660) [59200ms]
com.intellij.openapi.progress.impl.CoreProgressManager$$Lambda$1331/0x0000000800f09290.run(Unknown Source) [59200ms]
com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:220) [59200ms]
com.intellij.platform.diagnostic.telemetry.helpers.TraceKt.use(trace.kt:46) [59200ms]
com.intellij.openapi.progress.impl.CoreProgressManager$$Lambda$1997/0x00000008013d5cf0.invoke(Unknown Source) [59200ms]
com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$1(CoreProgressManager.java:221) [59200ms]
com.intellij.openapi.application.impl.RwLockHolder$$Lambda$6506/0x00000008035d5698.run(Unknown Source) [59200ms]
com.intellij.openapi.application.impl.RwLockHolder.runEdtProgressWriteAction$lambda$2$lambda$1(RwLockHolder.kt:431) [59200ms]
com.intellij.openapi.vfs.newvfs.RefreshSessionImpl$$Lambda$6501/0x00000008035d48b0.accept(Unknown Source) [59200ms]
com.intellij.openapi.vfs.newvfs.RefreshSessionImpl.lambda$fireEvents$1(RefreshSessionImpl.java:222) [59200ms]
com.intellij.openapi.vfs.newvfs.RefreshSessionImpl.fireEventsInWriteAction(RefreshSessionImpl.java:240) [59200ms]
com.intellij.openapi.vfs.newvfs.AsyncEventSupport.processEventsFromRefresh(AsyncEventSupport.java:153) [59200ms]
com.intellij.openapi.vfs.newvfs.persistent.PersistentFSImpl.processEventsImpl(PersistentFSImpl.java:1439) [59200ms]
com.intellij.openapi.vfs.newvfs.persistent.PersistentFSImpl.applyMultipleEvents(PersistentFSImpl.java:1457) [59200ms]
com.intellij.openapi.vfs.newvfs.persistent.PersistentFSImpl.fireBeforeEvents(PersistentFSImpl.java:1490) [59200ms]
com.intellij.openapi.vfs.newvfs.persistent.PersistentFSImpl.runSuppressing(PersistentFSImpl.java:1115) [59200ms]
com.intellij.openapi.vfs.newvfs.persistent.PersistentFSImpl$$Lambda$6512/0x00000008035d6b50.run(Unknown Source) [59200ms]
com.intellij.openapi.vfs.newvfs.persistent.PersistentFSImpl.lambda$fireBeforeEvents$15(PersistentFSImpl.java:1491) [59200ms]
jdk.proxy2/jdk.proxy2.$Proxy246.before(Unknown Source) [59200ms]
com.intellij.util.messages.impl.MessagePublisher.invoke(MessageBusImpl.kt:449) [59200ms]
com.intellij.util.messages.impl.ToDirectChildrenMessagePublisher.publish$intellij_platform_core(CompositeMessageBus.kt:310) [59200ms]
com.intellij.util.messages.impl.MessageBusImplKt.executeOrAddToQueue(MessageBusImpl.kt:492) [59200ms]
com.intellij.util.messages.impl.MessageBusImplKt.invokeListener(MessageBusImpl.kt:660) [59200ms]
com.intellij.util.messages.impl.MessageBusImplKt.invokeMethod(MessageBusImpl.kt:700) [59200ms]
java.base@17.0.10/java.lang.invoke.LambdaForm$MH/0x0000000800888000.invokeExact_MT(LambdaForm$MH) [59200ms]
java.base@17.0.10/java.lang.invoke.LambdaForm$MH/0x0000000800889000.invoke(LambdaForm$MH) [59200ms]
java.base@17.0.10/java.lang.invoke.LambdaForm$DMH/0x0000000800604000.invokeInterface(LambdaForm$DMH) [59200ms]
mobi.hsz.idea.gitignore.IgnoreManager$bulkFileListener$1.before(IgnoreManager.kt:96) [59200ms]
mobi.hsz.idea.gitignore.IgnoreManager$bulkFileListener$1.handleEvent(IgnoreManager.kt:101) [59200ms]
com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:840) [59200ms]
com.intellij.openapi.application.impl.RwLockHolder.runReadAction(RwLockHolder.kt:254) [59200ms]
mobi.hsz.idea.gitignore.IgnoreManager$bulkFileListener$1$$Lambda$6519/0x0000000802aa6e00.run(Unknown Source) [59200ms]
mobi.hsz.idea.gitignore.IgnoreManager$bulkFileListener$1.handleEvent$lambda$1(IgnoreManager.kt:102) [59200ms]
com.intellij.openapi.vfs.newvfs.impl.VirtualFileSystemEntry.getFileType(VirtualFileSystemEntry.java:621) [59200ms]
com.intellij.openapi.vfs.VirtualFile.getFileType(VirtualFile.java:356) [59200ms]
com.intellij.openapi.fileTypes.impl.FileTypeManagerImpl.getFileTypeByFile(FileTypeManagerImpl.java:737) [59200ms]
com.intellij.openapi.fileTypes.impl.FileTypeManagerImpl.getFileTypeByFile(FileTypeManagerImpl.java:822) [59200ms]
com.intellij.openapi.fileTypes.impl.FileTypeManagerImpl.internalContinueToDetectFileTypeByFile(FileTypeManagerImpl.java:836) [59200ms]
com.intellij.openapi.fileTypes.impl.FileTypeDetectionService.getOrDetectFromContent(FileTypeDetectionService.java:203) [59200ms]
com.intellij.openapi.fileTypes.impl.FileTypeDetectionService.getFirstBytes(FileTypeDetectionService.java:638) [59200ms]
com.intellij.openapi.fileTypes.impl.FileTypeDetectionService.readFirstBytesFromFile(FileTypeDetectionService.java:625) [59200ms]
com.intellij.openapi.fileTypes.impl.FileTypeDetectionService.readSafely(FileTypeDetectionService.java:526) [59200ms]
java.base@17.0.10/java.io.BufferedInputStream.read(BufferedInputStream.java:343) [59200ms]
java.base@17.0.10/java.io.BufferedInputStream.read1(BufferedInputStream.java:282) [59200ms]
java.base@17.0.10/sun.nio.ch.ChannelInputStream.read(ChannelInputStream.java:101) [59200ms]
java.base@17.0.10/sun.nio.ch.ChannelInputStream.read(ChannelInputStream.java:107) [59200ms]
java.base@17.0.10/sun.nio.ch.ChannelInputStream.read(ChannelInputStream.java:65) [59200ms]
java.base@17.0.10/sun.nio.ch.FileChannelImpl.read(FileChannelImpl.java:232) [59200ms]
@xtmq
Copy link

xtmq commented Jun 15, 2024

We have many similar reports in Rider:

at java.base@17.0.9/java.nio.file.Files.newInputStream(Files.java:160)
at com.intellij.openapi.vfs.impl.local.LocalFileSystemBase.getInputStream(LocalFileSystemBase.java:444)
at com.intellij.openapi.fileTypes.impl.FileTypeDetectionService.readFirstBytesFromFile(FileTypeDetectionService.java:619)
at com.intellij.openapi.fileTypes.impl.FileTypeDetectionService.getFirstBytes(FileTypeDetectionService.java:638)
at com.intellij.openapi.fileTypes.impl.FileTypeDetectionService.getOrDetectFromContent(FileTypeDetectionService.java:204)
at com.intellij.openapi.fileTypes.impl.FileTypeManagerImpl.internalContinueToDetectFileTypeByFile(FileTypeManagerImpl.java:830)
at com.intellij.openapi.fileTypes.impl.FileTypeManagerImpl.getFileTypeByFile(FileTypeManagerImpl.java:816)
at com.intellij.openapi.fileTypes.impl.FileTypeManagerImpl.getFileTypeByFile(FileTypeManagerImpl.java:732)
at com.intellij.openapi.vfs.VirtualFile.getFileType(VirtualFile.java:356)
at com.intellij.openapi.vfs.newvfs.impl.VirtualFileSystemEntry.getFileType(VirtualFileSystemEntry.java:637)
at mobi.hsz.idea.gitignore.IgnoreManager$bulkFileListener$1.handleEvent$lambda$1(IgnoreManager.kt:105)

See https://youtrack.jetbrains.com/issue/DEXP-764934

@hsz hsz self-assigned this Oct 16, 2024
hsz added a commit that referenced this issue Oct 16, 2024
@hsz hsz added this to the 4.5.4 milestone Oct 16, 2024
@hsz
Copy link
Member

hsz commented Oct 16, 2024

Fixed with 4.5.4 release!

@hsz hsz closed this as completed Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants