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>
Showing
Please
register
or
sign in
to comment