SaneNetScanner
SaneNetScanner copied to clipboard
Use adaptive Buffer algorithm
The aim is to make the User Interface as responsive as possible.
Therfore when we know the progress will be shown we should use a algorithm which updates often without inflecting on the performance when using to many updates.
An idea would be:
- use a maximum of n bytes
- measure the duration for the buffer to fill, adjust the buffer so that a buffer file takes between 150-250ms
- use at most 1/10 of the available lines as buffer
Always align the buffer to line boundaries.