From 4bd65532daa96250c0c8908e98dd4e39ec97703d Mon Sep 17 00:00:00 2001 From: orbiter Date: Tue, 22 Feb 2011 10:57:38 +0000 Subject: [PATCH] initialization of libraries concurrently (faster start-up) git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@7510 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- source/de/anomic/search/Switchboard.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/source/de/anomic/search/Switchboard.java b/source/de/anomic/search/Switchboard.java index cc44c554c..073bb9e08 100644 --- a/source/de/anomic/search/Switchboard.java +++ b/source/de/anomic/search/Switchboard.java @@ -186,7 +186,7 @@ public final class Switchboard extends serverSwitch { // storage management public File htCachePath; - public File dictionariesPath; + public final File dictionariesPath; public File listsPath; public File htDocsPath; public File workPath; @@ -294,7 +294,11 @@ public final class Switchboard extends serverSwitch { // init libraries this.log.logConfig("initializing libraries"); - LibraryProvider.initialize(this.dictionariesPath); + new Thread() { + public void run() { + LibraryProvider.initialize(dictionariesPath); + } + }.start(); // set a high maximum cache size to current size; this is adopted later automatically final int wordCacheMaxCount = (int) getConfigLong(SwitchboardConstants.WORDCACHE_MAX_COUNT, 20000);