indexing multithreaded by default

This commit is contained in:
Dmitry Avdeev
2010-10-08 13:24:24 +04:00
parent 8eb784f026
commit a3487f46cd
2 changed files with 4 additions and 1 deletions
@@ -134,6 +134,9 @@ class CacheUpdateRunner {
final boolean[] isFinished = new boolean[1];
try {
int threadsCount = Registry.intValue("caches.indexerThreadsCount");
if (threadsCount == -1) {
threadsCount = Math.min(Runtime.getRuntime().availableProcessors(), 2);
}
if (threadsCount == 1) {
Runnable process = new MyRunnable(innerIndicator, queue, isFinished, progressUpdater, processInReadAction, application);
ProgressManager.getInstance().runProcess(process, innerIndicator);
@@ -99,4 +99,4 @@ jar.build=false
keymap.show.alias.actions=false
frameworks.download.libraries.server.url=http://pluginsrepo-test:8080
caches.indexerThreadsCount=1
caches.indexerThreadsCount=-1