utopia-rise / godot-kotlin-jvm

Godot Kotlin JVM Module
MIT License
614 stars 44 forks source link

IDEA plugin - slow operation in IDEA 2024.1 EAP #570

Open Tapchicoma opened 8 months ago

Tapchicoma commented 8 months ago

I am using IDEA 2024.1 EAP and see the following error with the latest Godot-Kotlin plugin (0.8.1-4.2.0-IJ2023.2) installed:

ava.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:101)
    at com.intellij.openapi.vfs.newvfs.persistent.FSRecordsImpl.update(FSRecordsImpl.java:735)
    at com.intellij.openapi.vfs.newvfs.persistent.PersistentFSImpl.findChildInfo(PersistentFSImpl.java:645)
    at com.intellij.openapi.vfs.newvfs.impl.VirtualDirectoryImpl.findInPersistence(VirtualDirectoryImpl.java:155)
    at com.intellij.openapi.vfs.newvfs.impl.VirtualDirectoryImpl.doFindChild(VirtualDirectoryImpl.java:137)
    at com.intellij.openapi.vfs.newvfs.impl.VirtualDirectoryImpl.findChild(VirtualDirectoryImpl.java:83)
    at com.intellij.openapi.vfs.newvfs.impl.VirtualDirectoryImpl.findChild(VirtualDirectoryImpl.java:532)
    at com.intellij.openapi.vfs.newvfs.impl.VirtualDirectoryImpl.findChild(VirtualDirectoryImpl.java:51)
    at com.intellij.openapi.vfs.newvfs.VfsImplUtil.findFileByPath(VfsImplUtil.java:56)
    at com.intellij.openapi.vfs.impl.local.LocalFileSystemBase.findFileByPath(LocalFileSystemBase.java:115)
    at com.intellij.openapi.vfs.newvfs.ArchiveFileSystem.findLocalByRootPath(ArchiveFileSystem.java:243)
    at com.intellij.openapi.vfs.newvfs.persistent.PersistentFSImpl.findRoot(PersistentFSImpl.java:1616)
    at com.intellij.openapi.vfs.newvfs.persistent.PersistentFSImpl.ensureRootCached(PersistentFSImpl.java:1775)
    at com.intellij.openapi.vfs.newvfs.persistent.PersistentFSImpl.cacheMissedRootFromPersistence(PersistentFSImpl.java:1748)
    at com.intellij.openapi.vfs.newvfs.persistent.PersistentFSImpl$ParentFinder.ascendUntilCachedParent(PersistentFSImpl.java:1868)
    at com.intellij.openapi.vfs.newvfs.persistent.PersistentFSImpl$ParentFinder.find(PersistentFSImpl.java:1996)
    at com.intellij.openapi.vfs.newvfs.persistent.PersistentFSImpl.findFileById(PersistentFSImpl.java:1722)
    at com.intellij.openapi.vfs.newvfs.persistent.PersistentFSImpl.findFileById(PersistentFSImpl.java:82)
    at com.intellij.util.indexing.projectFilter.CachingProjectIndexableFilesFilter.containsFileId(CachingProjectIndexableFilesFilter.kt:24)
    at com.intellij.util.indexing.projectFilter.CachingProjectIndexableFilesFilter.containsFileId(CachingProjectIndexableFilesFilter.kt:16)
    at com.intellij.util.indexing.FileBasedIndexEx.lambda$getContainingFilesIterator$4(FileBasedIndexEx.java:247)
    at com.intellij.util.indexing.ValueContainer.forEach(ValueContainer.java:57)
    at com.intellij.util.indexing.FileBasedIndexEx.lambda$getContainingFilesIterator$5(FileBasedIndexEx.java:246)
    at com.intellij.util.indexing.FileBasedIndexEx.lambda$processExceptions$6(FileBasedIndexEx.java:301)
    at com.intellij.util.ConcurrencyUtil.withLock(ConcurrencyUtil.java:246)
    at com.intellij.util.indexing.FileBasedIndexEx.processExceptions(FileBasedIndexEx.java:301)
    at com.intellij.util.indexing.FileBasedIndexEx.getContainingFilesIterator(FileBasedIndexEx.java:243)
    at com.intellij.util.indexing.FileBasedIndexEx.getContainingFiles(FileBasedIndexEx.java:219)
    at com.intellij.util.indexing.FileBasedIndexImpl.getContainingFiles(FileBasedIndexImpl.java:1068)
    at com.intellij.psi.search.FileTypeIndex.getFiles(FileTypeIndex.java:44)
    at godot.intellij.plugin.listener.PsiTreeListener.initialIndex$lambda$5(PsiTreeListener.kt:123)
    at com.intellij.openapi.application.impl.RwLockHolder.runReadAction(RwLockHolder.kt:254)
    at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:802)
    at godot.intellij.plugin.listener.PsiTreeListener.initialIndex(PsiTreeListener.kt:118)
    at godot.intellij.plugin.project.GodotKotlinJvmProjectServiceImpl._init_$lambda$1(GodotKotlinJvmProjectServiceImpl.kt:38)
    at com.intellij.openapi.project.SmartModeScheduler.doRun(SmartModeScheduler.kt:138)
    at com.intellij.openapi.project.SmartModeScheduler.runAllWhileSmart(SmartModeScheduler.kt:130)
    at com.intellij.openapi.application.TransactionGuardImpl.runWithWritingAllowed(TransactionGuardImpl.java:209)
    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.RwLockHolder.runIntendedWriteActionOnCurrentThread(RwLockHolder.kt:204)
    at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:792)
    at com.intellij.openapi.application.impl.ApplicationImpl$2.run(ApplicationImpl.java:409)
    at com.intellij.openapi.application.impl.RwLockHolder.runWithEnabledImplicitRead(RwLockHolder.kt:138)
    at com.intellij.openapi.application.impl.RwLockHolder.runWithImplicitRead(RwLockHolder.kt:129)
    at com.intellij.openapi.application.impl.ApplicationImpl.runWithImplicitRead(ApplicationImpl.java:1114)
    at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:82)
    at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:124)
    at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:44)
    at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318)
    at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:781)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:728)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:722)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87)
    at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:750)
    at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.kt:700)
    at com.intellij.ide.IdeEventQueue._dispatchEvent$lambda$12(IdeEventQueue.kt:593)
    at com.intellij.openapi.application.impl.RwLockHolder.runWithoutImplicitRead(RwLockHolder.kt:105)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.kt:593)
    at com.intellij.ide.IdeEventQueue.access$_dispatchEvent(IdeEventQueue.kt:74)
    at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.compute(IdeEventQueue.kt:359)
    at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.compute(IdeEventQueue.kt:358)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:829)
    at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1.invoke(IdeEventQueue.kt:358)
    at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1.invoke(IdeEventQueue.kt:353)
    at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$1(IdeEventQueue.kt:1023)
    at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:106)
    at com.intellij.ide.IdeEventQueueKt.performActivity(IdeEventQueue.kt:1023)
    at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$7(IdeEventQueue.kt:353)
    at com.intellij.openapi.application.impl.RwLockHolder.runIntendedWriteActionOnCurrentThread(RwLockHolder.kt:209)
    at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:792)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.kt:395)
    at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:207)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
    at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:92)

IDEA info:

IntelliJ IDEA 2024.1 EAP (Ultimate Edition)
Build #IU-241.9959.31, built on January 26, 2024
piiertho commented 8 months ago

Currently we did not updated plugin to 2024.
@chippmann FYI