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:
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.
Monitoring for Screen Updates
This task involves checking for size changes, content changes, highlighting changes, cursor movement, etc. It's event-based on:
On other platforms, frequent polling (about every 40 milliseconds) is used.
Monitoring for Serial Input
This task is event-based on:
On other platforms, frequent polling (about every 40 milliseconds) is used.
Monitoring for USB Input
This task is event-based on:
On other platforms, frequent polling (about every 40 milliseconds) is used.
Monitoring for Bluetooth Input
This task is event-based on:
On other platforms, frequent polling (about every 40 milliseconds) is used.
Starting the Braille Driver
On all platforms, periodic retrying (about every five seconds) is used.
Starting the Speech Driver
On all platforms, periodic retrying (about every five seconds) is used.
Starting the Screen Driver
On all platforms, periodic retrying (about every five seconds) is used.
Starting the Keyboard Monitor
On all platforms, periodic retrying (about every five seconds) is used.
Creating the PID File
On all platforms, periodic retrying (about every five seconds) is used.