[Oberon] SystemV - Viewer Scroll
andreas_pirklbauer at yahoo.com
Tue Mar 19 12:30:45 CET 2019
> For backward scrolling, there are indeed other strategies thinkable
> to find line breaks compared to the current implementation.
(1) One is to read the source text twice - the first pass just counts
the number of line endings and computes the total displacement dY,
while the second pass (which is fast since it reads from the file buffer
in memory) does the actual scrolling. This is the approach chosen in EO.
(2) I have also played with generalizing the Files.Read operation to allow
reading in both directions (i.e. forward and backward) - then only one pass
is needed, at the expense of making module Files more complex. But it
doesn’t really speed up things much, given that in (1) an in-memory file
buffer is accessed during the second read operation.
More information about the Oberon