diff options
author | Jan-Marek Glogowski <glogow@fbihome.de> | 2016-08-10 12:00:53 +0200 |
---|---|---|
committer | Jan-Marek Glogowski <glogow@fbihome.de> | 2017-07-13 12:10:28 +0200 |
commit | 00aa0892e7385cd8395dd39814077958be42e720 (patch) | |
tree | fb12e4f87b1466e7261640a4b3a597c9c3981eba /sfx2 | |
parent | 11ffb51b758cd18a2c61d4bfa694f9f031ecd096 (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.
Change-Id: I498a73fd02d5fb6f5d7e9f742f3bce972de9b1f9
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/appl/appcfg.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/appl/newhelp.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/control/dispatch.cxx | 6 |
3 files changed, 2 insertions, 8 deletions
diff --git a/sfx2/source/appl/appcfg.cxx b/sfx2/source/appl/appcfg.cxx index 7585bbe44fb5..944ffd17facc 100644 --- a/sfx2/source/appl/appcfg.cxx +++ b/sfx2/source/appl/appcfg.cxx @@ -108,7 +108,7 @@ SfxEventAsyncer_Impl::SfxEventAsyncer_Impl( const SfxEventHint& rHint ) StartListening( *rHint.GetObjShell() ); pIdle.reset( new Idle("SfxEventASyncer") ); 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 c7f10c300465..236a649ccaf6 100644 --- a/sfx2/source/appl/newhelp.cxx +++ b/sfx2/source/appl/newhelp.cxx @@ -550,7 +550,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 ) ); } @@ -1437,7 +1436,6 @@ SfxHelpIndexWindow_Impl::SfxHelpIndexWindow_Impl(SfxHelpWindow_Impl* _pParent) m_pActiveLB->SetSelectHdl( LINK( this, SfxHelpIndexWindow_Impl, SelectHdl ) ); 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 f00259b1356f..2437fa49efd5 100644 --- a/sfx2/source/control/dispatch.cxx +++ b/sfx2/source/control/dispatch.cxx @@ -435,7 +435,7 @@ void SfxDispatcher::Construct_Impl() 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" ); } @@ -559,8 +559,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 @@ -748,8 +746,6 @@ void SfxDispatcher::DoActivate_Impl(bool bMDI) 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(); } } |