History

Revert "Instrument the inter-idle time and tweaking the timeout setting"

This reverts commit 0c88972f090abde0b2b91460aa4da37311445c9f.

ZappoMan committed 11 years ago

Commit 71eeecc1 parent a02822c1 file · +3 −22Browse files

Showing the changes to interface/src/Application.cpp (1 of 1 file). Show all

Unified · Split

interface/src/Application.cpp+3−22
@@ -1761,25 +1761,8 @@ void Application::checkFPS() { · 1760 unmodified lines
17611761 }
17621762
17631763 void Application::idle() {
1764− PROFILE_RANGE(__FUNCTION__);
1765− static SimpleAverage<float> interIdleDurations;
1766− static uint64_t lastIdleEnd{ 0 };
1767−
1768− if (lastIdleEnd != 0) {
1769− uint64_t now = usecTimestampNow();
1770− interIdleDurations.update(now - lastIdleEnd);
1771− static uint64_t lastReportTime = now;
1772− if ((now - lastReportTime) >= (USECS_PER_SECOND)) {
1773− static QString LOGLINE("Average inter-idle time: %1 us for %2 samples");
1774− if (Menu::getInstance()->isOptionChecked(MenuOption::LogExtraTimings)) {
1775− qCDebug(interfaceapp_timing) << LOGLINE.arg((int)interIdleDurations.getAverage()).arg(interIdleDurations.getCount());
1776− }
1777− interIdleDurations.reset();
1778− lastReportTime = now;
1779− }
1780− }
1781−
17821764 PerformanceTimer perfTimer("idle");
1765+
17831766 if (_aboutToQuit) {
17841767 return; // bail early, nothing to do here.
17851768 }
@@ -1823,15 +1806,13 @@ void Application::idle() { · 37 unmodified lines
18231806 _idleLoopStdev.reset();
18241807 }
18251808
1809+ // After finishing all of the above work, restart the idle timer, allowing 2ms to process events.
1810+ idleTimer->start(2);
18261811 }
1827− // After finishing all of the above work, ensure the idle timer is set to the proper interval,
1828− // depending on whether we're throttling or not
1829− idleTimer->start(_glWidget->isThrottleRendering() ? THROTTLED_IDLE_TIMER_DELAY : 1);
18301812 }
18311813
18321814 // check for any requested background downloads.
18331815 emit checkBackgroundDownloads();
1834− lastIdleEnd = usecTimestampNow();
18351816 }
18361817
18371818 void Application::setFullscreen(bool fullscreen) {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t