IDEA-178347 UI is frozen for a long time in ModuleManagerImpl.loadModules

This commit is contained in:
Dmitry Avdeev
2017-09-06 14:41:12 +03:00
parent 58312f1c30
commit 1e23d2a426
@@ -261,7 +261,7 @@ public abstract class ModuleManagerImpl extends ModuleManager implements Disposa
ExecutorService service = AppExecutorUtil.createBoundedApplicationPoolExecutor("modules loader", JobSchedulerImpl.CORES_COUNT);
List<Pair<Future<Module>, ModulePath>> tasks = new ArrayList<>();
Set<String> 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;