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

Slow Operations -- io.flutter.pub.PubRoot.forDirectory(PubRoot.java:141) #7792

Open
jwren opened this issue Nov 18, 2024 · 2 comments
Open
Assignees
Labels
performance General performance issues (not perf tool)
Milestone

Comments

@jwren
Copy link
Member

jwren commented Nov 18, 2024

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)

@jwren jwren added the performance General performance issues (not perf tool) label Nov 18, 2024
@jwren jwren added this to the M83 milestone Nov 18, 2024
@jwren jwren self-assigned this Nov 18, 2024
@jwren
Copy link
Member Author

jwren commented Nov 18, 2024

Flutter plugin version 82.0.3, IntelliJ IDEA 2024.2 (Ultimate Edition)

@jwren jwren modified the milestones: M83, M84 Nov 20, 2024
@jwren
Copy link
Member Author

jwren commented Nov 20, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance General performance issues (not perf tool)
Projects
None yet
Development

No branches or pull requests

1 participant