-
Committer:
Daniel van Vugt
-
Date:
2012-04-04 07:48:32 UTC
-
Revision ID:
daniel.van.vugt@canonical.com-20120404074832-csp6nyhdrq7bdei8
Faster window movement, by faster MotionNotify handling.
PrivateScreen::queueEvents has always been designed to try and deduplicate
MotionNotify events so as to reduce CPU load. However the old algorithm
fails to deduplicate events most of the time as the event loop is fast
enough that only one such event happened per iteration. Hence there was
nothing to deduplicate against.
This new algorithm deduplicates motion events across event loop iterations,
at least halving, usually quartering, the number of motion events that
need to be processed. This translates directly to lower CPU use.