From 3204946fc8cc3616251edfe81d3dffd2a2df11ee Mon Sep 17 00:00:00 2001 From: Book Pauk Date: Thu, 20 Oct 2022 16:05:09 +0700 Subject: [PATCH] =?UTF-8?q?=D0=A0=D0=B5=D1=84=D0=B0=D0=BA=D1=82=D0=BE?= =?UTF-8?q?=D1=80=D0=B8=D0=BD=D0=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/core/WebWorker.js | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/server/core/WebWorker.js b/server/core/WebWorker.js index e3e94fa..a34a500 100644 --- a/server/core/WebWorker.js +++ b/server/core/WebWorker.js @@ -170,14 +170,11 @@ class WebWorker { }, }); - //открываем все таблицы - await db.openAll(); + //открываем почти все таблицы + await db.openAll({exclude: ['author']}); - //переоткроем таблицу 'author' с бОльшим размером кеша блоков, для ускорения выборки - if (config.dbCacheSize < 100) { - await db.close({table: 'author'}); - await db.open({table: 'author', cacheSize: 100}); - } + //откроем таблицу 'author' с бОльшим размером кеша блоков, для ускорения выборки + await db.open({table: 'author', cacheSize: (config.dbCacheSize > 100 ? config.dbCacheSize : 100)}); this.dbSearcher = new DbSearcher(config, db);