Cut log window polling rate in half for lower CPU. 100ms is plenty fast.

knobtest
Elliott Liggett 2022-09-14 18:32:28 -07:00
rodzic 1b6cff85f4
commit 73b9c88e5e
1 zmienionych plików z 2 dodań i 5 usunięć

Wyświetl plik

@ -6969,7 +6969,8 @@ void wfmain::initLogging()
// Set handler // Set handler
qInstallMessageHandler(messageHandler); qInstallMessageHandler(messageHandler);
logCheckingTimer.setInterval(50); // Interval timer for log window updates:
logCheckingTimer.setInterval(100);
connect(&logCheckingTimer, SIGNAL(timeout()), this, SLOT(logCheck())); connect(&logCheckingTimer, SIGNAL(timeout()), this, SLOT(logCheck()));
logCheckingTimer.start(); logCheckingTimer.start();
} }
@ -6997,8 +6998,6 @@ void wfmain::messageHandler(QtMsgType type, const QMessageLogContext& context, c
{ {
// Open stream file writes // Open stream file writes
// TODO: Fix this parameter:
if (type == QtDebugMsg && !debugModeLogging) if (type == QtDebugMsg && !debugModeLogging)
{ {
return; return;
@ -7046,7 +7045,5 @@ void wfmain::messageHandler(QtMsgType type, const QMessageLogContext& context, c
logTextMutex.lock(); logTextMutex.lock();
logStringBuffer.push_back(text); logStringBuffer.push_back(text);
logTextMutex.unlock(); logTextMutex.unlock();
//logStringBuffer[logStringBufferPosition%logStringBufferSize] = text;
//logStringBufferPosition++;
} }