diff options
author | Jan-Marek Glogowski <glogow@fbihome.de> | 2019-04-26 14:59:34 +0200 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2019-04-27 13:22:38 +0200 |
commit | 88048832df5e4b4e81f4f2ec258b2c04063eab14 (patch) | |
tree | 56f1cbbeab2f792edb8052d1606630c1187e7268 /vcl/source/app/svmain.cxx | |
parent | 3bf32679971804ade8e85f0e8023dc3b127cc3dc (diff) |
Use AutoTimer for SystemDependentDataBuffer
This cache eviction timer is periodic, so just use an AutoTimer,
to prevent the "expensive" Start() calls. This will instantly
re-schedule the task again. OTOH Stop() is really cheap, as it
just sets a bool. Same for IsActive(), which just checks that
bool. We do lazy cleanup of stopped tasks in the scheduler.
This patch also changes the logic to just start the AutoTimer, if
it's not already running and just stops it in the timer handling
function, if there is nothing more to do. This way we can save
allmost all the previous Start() and Stop() calls, but eventually
have a single unneeded wakeup a second later.
Change-Id: Iae05483f557b94e07e51c4baae25315596923c9c
Reviewed-on: https://gerrit.libreoffice.org/71376
Tested-by: Jenkins
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Diffstat (limited to 'vcl/source/app/svmain.cxx')
-rw-r--r-- | vcl/source/app/svmain.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/vcl/source/app/svmain.cxx b/vcl/source/app/svmain.cxx index 6319208896ae..e395e1a8634d 100644 --- a/vcl/source/app/svmain.cxx +++ b/vcl/source/app/svmain.cxx @@ -473,7 +473,8 @@ void DeInitVCL() pSVData->mpSettingsConfigItem.reset(); - // empty and deactivate the SystemDependentDataManager + // prevent unnessesary painting during Scheduler shutdown + // as this processes all pending events in debug builds. ImplGetSystemDependentDataManager().flushAll(); Scheduler::ImplDeInitScheduler(); |