]> gerrit.simantics Code Review - simantics/platform.git/commit
Replace scheduleAtFixedRate with scheduleWithFixedDelay 35/4235/1
authorTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Thu, 7 May 2020 20:29:12 +0000 (23:29 +0300)
committerTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Thu, 7 May 2020 20:45:41 +0000 (20:45 +0000)
commitd570c7ea02f37af2f3da890ae1b576b841505a32
treee58de04eeb3f7bf6db5e43692115fe2abfa4b683
parentdee86c0f52ea411e7bd8e2fcc058e3d979574fba
Replace scheduleAtFixedRate with scheduleWithFixedDelay

ScheduledExecutorService.scheduleAtFixedRate tends to run enormous
amounts of runnables that would have been scheduled during a machine is
in sleep, after the machines wakes up from sleep, retroactively.

This is not good and can be avoided by using scheduleWithFixedDelay
which is usually good enough regarding the delay between executions.

gitlab #531

Change-Id: I4ac3b11f1f9236d411debb352fce610c33410659
(cherry picked from commit 00a0eae4da98b701fa38a6813b1743b754c5c99e)
bundles/org.simantics.diagram/src/org/simantics/diagram/profile/Updater.java
bundles/org.simantics.g2d/src/org/simantics/g2d/participant/OrientationRestorer.java
bundles/org.simantics.g2d/src/org/simantics/g2d/participant/TimeParticipant.java