From 912e8c4ae4f2630a49653c375ac63a71e21e0dd3 Mon Sep 17 00:00:00 2001 From: Shane Kearns Date: Mon, 12 Oct 2009 15:29:31 +0200 Subject: Fix for poor performance during screen orientation switch Processing the relayout takes longer than 100ms. Setting priority to low makes the app wait until all other apps have been processed before it gets scheduled again (over 3 seconds). By setting priority to background, the app is round-robin scheduled with the other apps (in 20ms timeslices) Task-number: QT-1030 Reviewed-by: axis --- src/corelib/kernel/qeventdispatcher_symbian.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/corelib/kernel/qeventdispatcher_symbian.cpp b/src/corelib/kernel/qeventdispatcher_symbian.cpp index acbb7e4..02f77a1 100644 --- a/src/corelib/kernel/qeventdispatcher_symbian.cpp +++ b/src/corelib/kernel/qeventdispatcher_symbian.cpp @@ -749,11 +749,11 @@ bool QEventDispatcherSymbian::processEvents ( QEventLoop::ProcessEventsFlags fla block = false; if (timeState == TimeStarted && time.elapsed() > 100) { priority = m_processHandle.Priority(); - m_processHandle.SetPriority(EPriorityLow); + m_processHandle.SetPriority(EPriorityBackground); time.start(); // Slight chance of race condition in the next lines, but nothing fatal // will happen, just wrong priority. - if (m_processHandle.Priority() == EPriorityLow) { + if (m_processHandle.Priority() == EPriorityBackground) { m_processHandle.SetPriority(priority); } } -- cgit v0.12