From 3b2df81b3d8372d2d19fb2481b4710a316dd93df Mon Sep 17 00:00:00 2001 From: Abs62 Date: Wed, 7 Sep 2022 17:35:52 +0300 Subject: [PATCH] Full-text search: Reduce max thread count --- fulltextsearch.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fulltextsearch.cc b/fulltextsearch.cc index 48917c37..0ccaab6e 100644 --- a/fulltextsearch.cc +++ b/fulltextsearch.cc @@ -146,6 +146,9 @@ FullTextSearchDialog::FullTextSearchDialog( QWidget * parent, ui.setupUi( this ); ftsThreadPool.setExpiryTimeout( -1 ); + int threads = ftsThreadPool.maxThreadCount(); + if( threads > 1 ) + ftsThreadPool.setMaxThreadCount( threads - 1 ); setAttribute( Qt::WA_DeleteOnClose, false ); setWindowFlags( windowFlags() & ~Qt::WindowContextHelpButtonHint );