Coder Social home page Coder Social logo

Comments (4)

ZHOUXING1997 avatar ZHOUXING1997 commented on May 24, 2024

在 goland eap 版本中拿到报错
GoLand 2023.3 Beta

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:101)
at com.intellij.util.indexing.FileBasedIndexScanUtil.ensureUpToDate(FileBasedIndexScanUtil.java:47)
at com.intellij.util.indexing.FileBasedIndexScanUtil.processAllKeys(FileBasedIndexScanUtil.java:77)
at com.intellij.util.indexing.FileBasedIndexImpl.processAllKeys(FileBasedIndexImpl.java:814)
at com.intellij.psi.search.FilenameIndex.processAllFileNameCharSequences(FilenameIndex.java:51)
at com.intellij.psi.search.FilenameIndex.processAllFileNames(FilenameIndex.java:45)
at com.intellij.psi.search.FilenameIndex.getAllFilenames(FilenameIndex.java:37)
at com.intellij.psi.search.FilenameIndex.getAllFilesByExt(FilenameIndex.java:201)
at com.intellij.psi.search.FilenameIndex.getAllFilesByExt(FilenameIndex.java:190)
at io.github.linwancen.plugin.show.ext.conf.ConfCache.lambda$loadAll$0(ConfCache.java:122)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:878)
at io.github.linwancen.plugin.show.ext.conf.ConfCache.lambda$loadAll$1(ConfCache.java:121)
at com.intellij.openapi.project.DumbService.runReadActionInSmartMode(DumbService.kt:117)
at io.github.linwancen.plugin.show.ext.conf.ConfCache.loadAll(ConfCache.java:120)
at io.github.linwancen.plugin.show.ext.conf.ConfFileInitListener.projectOpened(ConfFileInitListener.java:19)
at com.intellij.util.messages.impl.MessageBusImplKt.invokeMethod(MessageBusImpl.kt:700)
at com.intellij.util.messages.impl.MessageBusImplKt.invokeListener(MessageBusImpl.kt:664)
at com.intellij.util.messages.impl.MessageBusImplKt.executeOrAddToQueue(MessageBusImpl.kt:492)
at com.intellij.util.messages.impl.ToDirectChildrenMessagePublisher.publish$intellij_platform_core(CompositeMessageBus.kt:310)
at com.intellij.util.messages.impl.MessagePublisher.invoke(MessageBusImpl.kt:449)
at jdk.proxy1/jdk.proxy1.$Proxy98.projectOpened(Unknown Source)
at com.intellij.openapi.project.impl.ProjectManagerImplKt$runInitProjectActivities$2.invokeSuspend(ProjectManagerImpl.kt:989)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
at com.intellij.openapi.application.impl.DispatchedRunnable.run(DispatchedRunnable.kt:43)
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.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:843)
at com.intellij.openapi.application.impl.ApplicationImpl$4.run(ApplicationImpl.java:463)
at com.intellij.openapi.application.impl.RwLockHolder.runWithEnabledImplicitRead(RwLockHolder.kt:75)
at com.intellij.openapi.application.impl.RwLockHolder.runWithImplicitRead(RwLockHolder.kt:67)
at com.intellij.openapi.application.impl.ApplicationImpl.runWithImplicitRead(ApplicationImpl.java:1430)
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:792)
at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:739)
at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:733)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:761)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.kt:695)
at com.intellij.ide.IdeEventQueue._dispatchEvent$lambda$12(IdeEventQueue.kt:589)
at com.intellij.openapi.application.impl.RwLockHolder.runWithoutImplicitRead(RwLockHolder.kt:44)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.kt:589)
at com.intellij.ide.IdeEventQueue.access$_dispatchEvent(IdeEventQueue.kt:72)
at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.compute(IdeEventQueue.kt:355)
at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.compute(IdeEventQueue.kt:354)
at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:793)
at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1.invoke(IdeEventQueue.kt:354)
at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1.invoke(IdeEventQueue.kt:349)
at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$1(IdeEventQueue.kt:1014)
at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:106)
at com.intellij.ide.IdeEventQueueKt.performActivity(IdeEventQueue.kt:1014)
at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$7(IdeEventQueue.kt:349)
at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:848)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.kt:391)
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)

from show-comment.

LinWanCen avatar LinWanCen commented on May 24, 2024

报错是说在 UI 线程执行了个慢操作,之前写异步的时候没看源码用了两个不是异步的方法包裹,尝试修改如下,你更新到 2.12 版本看看。

DumbService.getInstance(project).runReadActionInSmartMode(() ->
    ApplicationManager.getApplication().runReadAction(() -> {
改成
DumbService.getInstance(project).smartInvokeLater(() -> {

static void loadAll(@NotNull Project project) {
DumbService.getInstance(project).smartInvokeLater(() -> {
@NotNull Collection<VirtualFile> files = FilenameIndex.getAllFilesByExt(project, TsvLoader.EXT);
@NotNull StringBuilder sb = new StringBuilder();
for (@NotNull VirtualFile file : files) {
load(file);
sb.append(file.getName()).append("\n");
}
if (files.isEmpty()) {
return;
}
ProjectView.getInstance(project).refresh();
LOG.info("Ext doc conf load all complete {} files\n{}", files.size(), sb);
});
}

from show-comment.

ZHOUXING1997 avatar ZHOUXING1997 commented on May 24, 2024

from show-comment.

LinWanCen avatar LinWanCen commented on May 24, 2024

您好,这个问题现在还出现吗?

from show-comment.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.