Handled performance issues and bugs noticed during testing of refs #319 / refs #322

* discussion: https://dev.vatsim-germany.org/boards/22/topics/2027?r=2040#message-2040
* fixed bug with ATC station component, wrong signals for booked stations
* booked stations loading to frequently (for each minor change such as online), changed to timestamp based concept
* update booked stations with receiving ATIS/voiceroom to online
* CDigestSignal class: new class and methods for collecting signals, avoiding too many signals - one of the cures for the performance issues
* fixed bug found during testing, missing start for timers when connecting to network
This commit is contained in:
Klaus Basan
2014-08-31 15:54:19 +02:00
parent 538cee89b2
commit fc84673bb9
12 changed files with 209 additions and 63 deletions

View File

@@ -144,7 +144,7 @@ void MainWindow::init(const CRuntimeConfig &runtimeConfig)
this->ps_registerHotkeyFunctions();
// update timers
this->startUpdateTimers();
this->startUpdateTimersWhenConnected();
// do this as last statement, so it can be used as flag
// whether init has been completed
@@ -246,17 +246,17 @@ void MainWindow::initialDataReads()
/*
* Start update timers
*/
void MainWindow::startUpdateTimers()
void MainWindow::startUpdateTimersWhenConnected()
{
this->ui->comp_MainInfoArea->getAircraftComponent()->setUpdateIntervalSeconds(this->ui->comp_MainInfoArea->getSettingsComponent()->getAircraftUpdateIntervalSeconds());
this->ui->comp_MainInfoArea->getAtcStationComponent()->setUpdateIntervalSeconds(this->ui->comp_MainInfoArea->getSettingsComponent()->getAtcUpdateIntervalSeconds());
this->ui->comp_MainInfoArea->getAircraftComponent()->setUpdateIntervalSeconds(this->ui->comp_MainInfoArea->getSettingsComponent()->getAircraftUpdateIntervalSeconds());
this->ui->comp_MainInfoArea->getUserComponent()->setUpdateIntervalSeconds(this->ui->comp_MainInfoArea->getSettingsComponent()->getUsersUpdateIntervalSeconds());
}
/*
* Stop udate timers
*/
void MainWindow::stopUpdateTimers()
void MainWindow::stopUpdateTimersWhenDisconnected()
{
this->ui->comp_MainInfoArea->getAtcStationComponent()->stopTimer();
this->ui->comp_MainInfoArea->getAircraftComponent()->stopTimer();
@@ -271,7 +271,7 @@ void MainWindow::stopAllTimers(bool disconnect)
this->m_timerStatusBar->stop();
this->m_timerContextWatchdog->stop();
this->m_timerSimulator->stop();
this->stopUpdateTimers();
this->stopUpdateTimersWhenDisconnected();
if (!disconnect) return;
this->disconnect(this->m_timerStatusBar);
this->disconnect(this->m_timerContextWatchdog);