summaryrefslogtreecommitdiffstats
path: root/tools/assistant/lib
diff options
context:
space:
mode:
Diffstat (limited to 'tools/assistant/lib')
-rw-r--r--tools/assistant/lib/qhelpcollectionhandler.cpp8
-rw-r--r--tools/assistant/lib/qhelpgenerator.cpp3
-rw-r--r--tools/assistant/lib/qhelpsearchindexwriter_clucene.cpp2
-rw-r--r--tools/assistant/lib/qhelpsearchindexwriter_default.cpp2
4 files changed, 13 insertions, 2 deletions
diff --git a/tools/assistant/lib/qhelpcollectionhandler.cpp b/tools/assistant/lib/qhelpcollectionhandler.cpp
index 235f737..bd8dc20 100644
--- a/tools/assistant/lib/qhelpcollectionhandler.cpp
+++ b/tools/assistant/lib/qhelpcollectionhandler.cpp
@@ -114,6 +114,9 @@ bool QHelpCollectionHandler::openCollectionFile()
return false;
}
+ m_query.exec(QLatin1String("PRAGMA synchronous=OFF"));
+ m_query.exec(QLatin1String("PRAGMA cache_size=3000"));
+
m_query.exec(QLatin1String("SELECT COUNT(*) FROM sqlite_master WHERE TYPE=\'table\'"
"AND Name=\'NamespaceTable\'"));
m_query.next();
@@ -163,6 +166,9 @@ bool QHelpCollectionHandler::copyCollectionFile(const QString &fileName)
return false;
}
+ copyQuery->exec(QLatin1String("PRAGMA synchronous=OFF"));
+ copyQuery->exec(QLatin1String("PRAGMA cache_size=3000"));
+
if (!createTables(copyQuery)) {
emit error(tr("Cannot copy collection file: %1").arg(colFile));
return false;
@@ -582,6 +588,8 @@ void QHelpCollectionHandler::optimizeDatabase(const QString &fileName)
}
QSqlQuery query(db);
+ db.exec(QLatin1String("PRAGMA synchronous=OFF"));
+ db.exec(QLatin1String("PRAGMA cache_size=3000"));
db.exec(QLatin1String("CREATE INDEX IF NOT EXISTS NameIndex ON IndexTable(Name)"));
db.exec(QLatin1String("CREATE INDEX IF NOT EXISTS FileNameIndex ON FileNameTable(Name)"));
db.exec(QLatin1String("CREATE INDEX IF NOT EXISTS FileIdIndex ON FileNameTable(FileId)"));
diff --git a/tools/assistant/lib/qhelpgenerator.cpp b/tools/assistant/lib/qhelpgenerator.cpp
index 783f016..85bdd75 100644
--- a/tools/assistant/lib/qhelpgenerator.cpp
+++ b/tools/assistant/lib/qhelpgenerator.cpp
@@ -191,6 +191,9 @@ bool QHelpGenerator::generate(QHelpDataInterface *helpData,
return false;
}
+ d->query->exec(QLatin1String("PRAGMA synchronous=OFF"));
+ d->query->exec(QLatin1String("PRAGMA cache_size=3000"));
+
addProgress(1.0);
createTables();
insertFileNotFoundFile();
diff --git a/tools/assistant/lib/qhelpsearchindexwriter_clucene.cpp b/tools/assistant/lib/qhelpsearchindexwriter_clucene.cpp
index d9dcec5..4baa376 100644
--- a/tools/assistant/lib/qhelpsearchindexwriter_clucene.cpp
+++ b/tools/assistant/lib/qhelpsearchindexwriter_clucene.cpp
@@ -586,7 +586,7 @@ void QHelpSearchIndexWriter::updateIndex(const QString &collectionFile,
this->m_indexFilesFolder = indexFilesFolder;
mutex.unlock();
- start(QThread::NormalPriority);
+ start(QThread::LowestPriority);
}
void QHelpSearchIndexWriter::optimizeIndex()
diff --git a/tools/assistant/lib/qhelpsearchindexwriter_default.cpp b/tools/assistant/lib/qhelpsearchindexwriter_default.cpp
index cb3e49c..827d145 100644
--- a/tools/assistant/lib/qhelpsearchindexwriter_default.cpp
+++ b/tools/assistant/lib/qhelpsearchindexwriter_default.cpp
@@ -191,7 +191,7 @@ void QHelpSearchIndexWriter::updateIndex(const QString &collectionFile,
this->m_collectionFile = collectionFile;
this->m_indexFilesFolder = indexFilesFolder;
- start(QThread::NormalPriority);
+ start(QThread::LowestPriority);
}
void QHelpSearchIndexWriter::run()