File: README.Polling

package info (click to toggle)
brltty 6.8-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 35,776 kB
  • sloc: ansic: 150,447; java: 13,484; sh: 9,667; xml: 5,702; tcl: 2,634; makefile: 2,328; awk: 713; lisp: 366; python: 321; ml: 301
file content (93 lines) | stat: -rw-r--r-- 2,772 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
~~~~~~~
Polling
~~~~~~~

.. include:: prologue.rst

As of release 5.0, BRLTTY has been converted from being polling-based to being 
event-based. This means, among other things, that it's now able to become 
completely idle whenever it doesn't have anything useful to do. For comparison, 
it formerly used a huge, central, main loop which was run frequently (about 25 
times per second), and which was aware of, and had to check for, every single
task that might need to be performed.

In practical terms, this change, when compared with how BRLTTY used to work, 
delivers at least the following significant benefits:

*  Noticeably improved response time. Near instant reaction to significant user
   and system events rather than waiting for the next polling cycle to check
   for them.

*  Much less system load. Just a few, short-lived bursts of activity when
   actually necessary rather than frequent, much longer-lived checking that,
   far more often than not, resulted in nothing needing to be done.

*  Way less battery drain. The system is no longer forced either to remain
   awake or to continually wake up after a rather brief nap.

There are cases in which polling is still being used. Some of these will
eventually be resolved by future code changes, while others, unfortunately, are
required due to host platform limitations.

.. topic:: Monitoring for Screen Updates

   This task involves checking for size changes, content changes, highlighting
   changes, cursor movement, etc. It's event-based on:

   *  Android

   *  Linux text consoles if the kernel is at least 2.6.37 (released on January 4,
      2011)

   *  Linux graphics consoles monitored via AT-SPI2.

   On other platforms, |frequent polling| is used.

.. topic:: Monitoring for Serial Input

   This task is event-based on:

   *  Linux

   On other platforms, |frequent polling| is used.

.. topic:: Monitoring for USB Input

   This task is event-based on:

   *  Linux

   On other platforms, |frequent polling| is used.

.. topic:: Monitoring for Bluetooth Input

   This task is event-based on:

   *  Android

   *  Linux

   On other platforms, |frequent polling| is used.

.. topic:: Starting the Braille Driver

   On all platforms, |periodic retrying| is used.

.. topic:: Starting the Speech Driver

   On all platforms, |periodic retrying| is used.

.. topic:: Starting the Screen Driver

   On all platforms, |periodic retrying| is used.

.. topic:: Starting the Keyboard Monitor

   On all platforms, |periodic retrying| is used.

.. topic:: Creating the PID File

   On all platforms, |periodic retrying| is used.

.. |frequent polling| replace:: frequent polling (about every 40 milliseconds)
.. |periodic retrying| replace:: periodic retrying (about every five seconds)