mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2026-07-16 15:54:09 -04:00
Improve performance of Fox and contest log view windows
This include inverting the order of table view rows so the newest is at the top, without that the Qt MVC interactions when using a database table based model is too slow and complex to manage. The table views now have sort by column capability in the normal way (click column header to reverse sort order) for timely logging and non-disruption of Tx starts the log view should be sorted in descending time order and scrolled to the last row added. Without that Fox and contest logging will work but serious delays may be invoked that disrupt operation.
This commit is contained in:
@@ -6,6 +6,8 @@
|
||||
#include <locale.h>
|
||||
#include <fftw3.h>
|
||||
|
||||
#include <QSharedMemory>
|
||||
#include <QTemporaryFile>
|
||||
#include <QDateTime>
|
||||
#include <QApplication>
|
||||
#include <QRegularExpression>
|
||||
@@ -21,6 +23,7 @@
|
||||
#include <QCommandLineParser>
|
||||
#include <QCommandLineOption>
|
||||
#include <QSqlDatabase>
|
||||
#include <QSqlQuery>
|
||||
#include <QSqlError>
|
||||
|
||||
#include "revision_utils.hpp"
|
||||
@@ -288,6 +291,12 @@ int main(int argc, char *argv[])
|
||||
throw std::runtime_error {("Database Error: " + db.lastError ().text ()).toStdString ()};
|
||||
}
|
||||
|
||||
// better performance traded for a risk of d/b corruption
|
||||
// on system crash or application crash
|
||||
// db.exec ("PRAGMA synchronous=OFF"); // system crash risk
|
||||
// db.exec ("PRAGMA journal_mode=MEMORY"); // application crash risk
|
||||
db.exec ("PRAGMA locking_mode=EXCLUSIVE");
|
||||
|
||||
int result;
|
||||
do
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user