SaneNetScanner icon indicating copy to clipboard operation
SaneNetScanner copied to clipboard

Use adaptive Buffer algorithm

Open kleinweby opened this issue 13 years ago • 0 comments

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.

kleinweby avatar Aug 07 '12 16:08 kleinweby