Polling

Jan Bottorff janb at pmatrix.com
Fri Feb 25 23:42:23 UTC 2000


>* Polling uses up CPU cycles needlessly.
>* To avoid using up those CPU cycles, one puts in delays.
>* Delays make GUIs less responsive.

Did anybody mention that polling burns up much more battery power compared
to being event driven. The number of cpu cycles need to process an event is
exactly the number of cycles to process the event. The number of cycles
needed to poll depends on how long things are idle + the cycles to process
the event.

Also note, Windows platforms can't generally delay a process for less than
15 milliseconds, which may be adding some latency if polling tries to sleep
between events.

These two tradeoff, longer poll runs before sleeping improve
responsiveness, and degrades power conservation.

- Jan





More information about the Squeak-dev mailing list