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
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:
Always align the buffer to line boundaries.