summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2016-08-10 12:00:53 +0200
committerKatarina Behrens <Katarina.Behrens@cib.de>2017-08-09 15:01:45 +0200
commitbec653b8df85372b1c5065601e23fa399117bda2 (patch)
tree04a9c727c08857daed131a033da10b2a5a9489bb /sfx2
parenta7f55104ff8b83a8d772101d8f17af43213eb39d (diff)
Reorganize Scheduler priority classes
This is based on glibs classification of tasks, but while glib uses an int for more fine grained priority, we stay with our enum. 1. Timers start with DEFAULT priority, which directly corresponds with the previous HIGH priority 2. Idles start with DEFAULT_IDLE priority instead of the previous HIGH priority, so idle default becomes "really run when idle". As RESIZE and REPAINT are special, and the DEFAULTS are set, there is just one primary decision for the programmer: should my idle run before paint (AKA HIGH_IDLE)? If we really need a more fine-grained classification, we can add it later, or also switch to a real int. As a result, this drops many classifications from the code and drastically changes behaviour, AKA a mail merge from KDE is now as fast as Gtk+ again. Conflicts: formula/source/ui/dlg/formula.cxx svx/source/sdr/event/eventhandler.cxx sw/source/uibase/docvw/srcedtw.cxx sw/source/uibase/utlui/unotools.cxx vcl/source/uitest/uno/uiobject_uno.cxx Change-Id: I498a73fd02d5fb6f5d7e9f742f3bce972de9b1f9
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/appl/appcfg.cxx2
-rw-r--r--sfx2/source/appl/newhelp.cxx2
-rw-r--r--sfx2/source/control/dispatch.cxx6
3 files changed, 2 insertions, 8 deletions
diff --git a/sfx2/source/appl/appcfg.cxx b/sfx2/source/appl/appcfg.cxx
index 635562dcb4fc..e6366d2ae5ac 100644
--- a/sfx2/source/appl/appcfg.cxx
+++ b/sfx2/source/appl/appcfg.cxx
@@ -111,7 +111,7 @@ SfxEventAsyncer_Impl::SfxEventAsyncer_Impl( const SfxEventHint& rHint )
StartListening( *rHint.GetObjShell() );
pIdle = new Idle;
pIdle->SetInvokeHandler( LINK(this, SfxEventAsyncer_Impl, IdleHdl) );
- pIdle->SetPriority( TaskPriority::HIGHEST );
+ pIdle->SetPriority( TaskPriority::HIGH_IDLE );
pIdle->SetDebugName( "sfx::SfxEventAsyncer_Impl pIdle" );
pIdle->Start();
}
diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx
index f31861a8052a..f83a79108833 100644
--- a/sfx2/source/appl/newhelp.cxx
+++ b/sfx2/source/appl/newhelp.cxx
@@ -552,7 +552,6 @@ IndexTabPage_Impl::IndexTabPage_Impl(vcl::Window* pParent, SfxHelpIndexWindow_Im
m_pOpenBtn->SetClickHdl( LINK( this, IndexTabPage_Impl, OpenHdl ) );
aFactoryIdle.SetInvokeHandler( LINK(this, IndexTabPage_Impl, IdleHdl ));
- aFactoryIdle.SetPriority(TaskPriority::LOWER);
aKeywordTimer.SetInvokeHandler( LINK( this, IndexTabPage_Impl, TimeoutHdl ) );
}
@@ -1433,7 +1432,6 @@ SfxHelpIndexWindow_Impl::SfxHelpIndexWindow_Impl(SfxHelpWindow_Impl* _pParent)
nMinWidth = ( m_pActiveLB->GetSizePixel().Width() / 2 );
aIdle.SetInvokeHandler( LINK( this, SfxHelpIndexWindow_Impl, InitHdl ) );
- aIdle.SetPriority( TaskPriority::LOWER );
aIdle.Start();
Show();
diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx
index 567fced85296..f7c981d08da9 100644
--- a/sfx2/source/control/dispatch.cxx
+++ b/sfx2/source/control/dispatch.cxx
@@ -437,7 +437,7 @@ void SfxDispatcher::Construct_Impl( SfxDispatcher* pParent )
xImp->xPoster = new SfxHintPoster(aGenLink);
- xImp->aIdle.SetPriority(TaskPriority::MEDIUM);
+ xImp->aIdle.SetPriority(TaskPriority::HIGH_IDLE );
xImp->aIdle.SetInvokeHandler( LINK(this, SfxDispatcher, EventHdl_Impl ) );
xImp->aIdle.SetDebugName( "sfx::SfxDispatcher_Impl aIdle" );
}
@@ -574,8 +574,6 @@ void SfxDispatcher::Pop(SfxShell& rShell, SfxDispatcherPopFlags nMode)
if(!pSfxApp->IsDowning() && !xImp->aToDoStack.empty())
{
// No immediate update is requested
- xImp->aIdle.SetPriority(TaskPriority::MEDIUM);
- xImp->aIdle.SetInvokeHandler( LINK(this, SfxDispatcher, EventHdl_Impl ) );
xImp->aIdle.Start();
}
else
@@ -777,8 +775,6 @@ void SfxDispatcher::DoActivate_Impl(bool bMDI, SfxViewFrame* /* pOld */)
if(!xImp->aToDoStack.empty())
{
// No immediate update is requested
- xImp->aIdle.SetPriority(TaskPriority::MEDIUM);
- xImp->aIdle.SetInvokeHandler( LINK(this, SfxDispatcher, EventHdl_Impl ) );
xImp->aIdle.Start();
}
}