[Libreoffice-commits] core.git: vcl/source
Jan-Marek Glogowski (via logerrit)
logerrit at kemper.freedesktop.org
Tue Mar 23 18:59:36 UTC 2021
vcl/source/app/scheduler.cxx | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
New commits:
commit 1c51a52fda039cafaa6b6f9cc817b1e54ac04ee5
Author: Jan-Marek Glogowski <glogow at fbihome.de>
AuthorDate: Fri Mar 19 15:21:58 2021 +0100
Commit: Jan-Marek Glogowski <glogow at fbihome.de>
CommitDate: Tue Mar 23 19:58:49 2021 +0100
VCL force Scheduler instant timeout on task skip
If we skipped the current task processing, we need to immediately
schedule a new timeout, as we know there is a pending task. So set
nMinPeriod to 0, as it contains the period to the next pending
task, and update the system timer.
Fix regression from commit d3b498cc4732f964919fecb265085cefcc422469
("invoke idle priority timers only when actually idle").
Change-Id: Ie3fc176fade595ec7406fec0835835bd86dfbd90
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112762
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow at fbihome.de>
diff --git a/vcl/source/app/scheduler.cxx b/vcl/source/app/scheduler.cxx
index 57b8176521f7..6ec07d4b020f 100644
--- a/vcl/source/app/scheduler.cxx
+++ b/vcl/source/app/scheduler.cxx
@@ -425,11 +425,6 @@ bool Scheduler::ProcessTaskScheduling()
break;
}
- if ( InfiniteTimeoutMs != nMinPeriod )
- SAL_INFO("vcl.schedule", "Calculated minimum timeout as " << nMinPeriod
- << " of " << nTasks << " tasks" );
- UpdateSystemTimer( rSchedCtx, nMinPeriod, true, nTime );
-
// Delay invoking tasks with idle priorities as long as there are user input or repaint events
// in the OS event queue. This will often effectively compress such events and repaint only
// once at the end, improving performance in cases such as repeated zooming with a complex document.
@@ -439,8 +434,14 @@ bool Scheduler::ProcessTaskScheduling()
SAL_INFO( "vcl.schedule", tools::Time::GetSystemTicks()
<< " idle priority task " << pMostUrgent << " delayed, system events pending" );
pMostUrgent = nullptr;
+ nMinPeriod = 0;
}
+ if (InfiniteTimeoutMs != nMinPeriod)
+ SAL_INFO("vcl.schedule",
+ "Calculated minimum timeout as " << nMinPeriod << " of " << nTasks << " tasks");
+ UpdateSystemTimer(rSchedCtx, nMinPeriod, true, nTime);
+
if ( pMostUrgent )
{
SAL_INFO( "vcl.schedule", tools::Time::GetSystemTicks() << " "
More information about the Libreoffice-commits
mailing list