From 1e23d2a426f4b3100b0fe07f7f02f8ece8dcf7e6 Mon Sep 17 00:00:00 2001 From: Dmitry Avdeev Date: Wed, 6 Sep 2017 14:38:38 +0300 Subject: [PATCH] IDEA-178347 UI is frozen for a long time in ModuleManagerImpl.loadModules --- .../src/com/intellij/openapi/module/impl/ModuleManagerImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/projectModel-impl/src/com/intellij/openapi/module/impl/ModuleManagerImpl.java b/platform/projectModel-impl/src/com/intellij/openapi/module/impl/ModuleManagerImpl.java index dbd870d142a3..f70d47fd9ba2 100644 --- a/platform/projectModel-impl/src/com/intellij/openapi/module/impl/ModuleManagerImpl.java +++ b/platform/projectModel-impl/src/com/intellij/openapi/module/impl/ModuleManagerImpl.java @@ -261,7 +261,7 @@ public abstract class ModuleManagerImpl extends ModuleManager implements Disposa ExecutorService service = AppExecutorUtil.createBoundedApplicationPoolExecutor("modules loader", JobSchedulerImpl.CORES_COUNT); List, ModulePath>> tasks = new ArrayList<>(); Set paths = new THashSet<>(); - boolean parallel = Registry.is("parallel.modules.loading"); + boolean parallel = Registry.is("parallel.modules.loading") && !ApplicationManager.getApplication().isDispatchThread(); for (ModulePath modulePath : myModulePathsToLoad) { if (progressIndicator.isCanceled()) { break;