-
Notifications
You must be signed in to change notification settings - Fork 325
Slow Operations -- io.flutter.pub.PubRoot.forDirectory(PubRoot.java:141) #7792
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
Comments
Flutter plugin version |
I believe that wrapping this runnable in a nonBlocking ReadAction will resolve this Throwable. https://github.com/JetBrains/intellij-community/blob/idea/243.21565.193/platform/core-api/src/com/intellij/openapi/application/ReadAction.java#L94 |
The previous fix caused #7968 |
@alexander-doroshko: I'm curious if you have any thoughts on the "correct way" to address these exceptions. Is |
Yes, in Java it's The second option is switching to Kotlin coroutines and using suspend functions |
java.lang.Throwable: Slow operations are prohibited on EDT. See SlowOperations.assertSlowOperationsAreAllowed javadoc.
at com.intellij.openapi.diagnostic.Logger.error(Logger.java:376)
at com.intellij.util.SlowOperations.assertSlowOperationsAreAllowed(SlowOperations.java:106)
at com.intellij.openapi.vfs.newvfs.persistent.FSRecordsImpl.update(FSRecordsImpl.java:727)
at com.intellij.openapi.vfs.newvfs.persistent.PersistentFSImpl.findChildInfo(PersistentFSImpl.java:672)
at com.intellij.openapi.vfs.newvfs.impl.VirtualDirectoryImpl.findInPersistence(VirtualDirectoryImpl.java:159)
at com.intellij.openapi.vfs.newvfs.impl.VirtualDirectoryImpl.doFindChild(VirtualDirectoryImpl.java:141)
at com.intellij.openapi.vfs.newvfs.impl.VirtualDirectoryImpl.findChild(VirtualDirectoryImpl.java:87)
at com.intellij.openapi.vfs.newvfs.impl.VirtualDirectoryImpl.findChild(VirtualDirectoryImpl.java:541)
at com.intellij.openapi.vfs.newvfs.impl.VirtualDirectoryImpl.findChild(VirtualDirectoryImpl.java:53)
at io.flutter.pub.PubRoot.forDirectory(PubRoot.java:141)
at io.flutter.sdk.FlutterPluginsLibraryManager.getFlutterPluginPaths(FlutterPluginsLibraryManager.java:140)
at io.flutter.sdk.FlutterPluginsLibraryManager.updateFlutterPluginsImpl(FlutterPluginsLibraryManager.java:118)
at io.flutter.sdk.FlutterPluginsLibraryManager.updateFlutterPlugins(FlutterPluginsLibraryManager.java:110)
at com.intellij.openapi.project.DumbServiceImpl.smartInvokeLater$lambda$16(DumbServiceImpl.kt:572)
at com.intellij.util.concurrency.ContextRunnable.run(ContextRunnable.java:27)
at com.intellij.openapi.application.TransactionGuardImpl.runWithWritingAllowed(TransactionGuardImpl.java:229)
at com.intellij.openapi.application.TransactionGuardImpl.access$100(TransactionGuardImpl.java:22)
at com.intellij.openapi.application.TransactionGuardImpl$1.run(TransactionGuardImpl.java:191)
at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runIntendedWriteActionOnCurrentThread$lambda$1(AnyThreadWriteThreadingSupport.kt:184)
at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runWriteIntentReadAction(AnyThreadWriteThreadingSupport.kt:84)
at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runIntendedWriteActionOnCurrentThread(AnyThreadWriteThreadingSupport.kt:183)
at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:836)
at com.intellij.openapi.application.impl.ApplicationImpl$2.run(ApplicationImpl.java:425)
at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runWithImplicitRead(AnyThreadWriteThreadingSupport.kt:122)
at com.intellij.openapi.application.impl.ApplicationImpl.runWithImplicitRead(ApplicationImpl.java:1162)
The text was updated successfully, but these errors were encountered: