Closed walles closed 3 years ago
In profiling, tokensFromString() turns up hot when I mouse scroll vigorously up and down.
tokensFromString()
Currently, our Readers provide strings.
Reader
string
What they should provide is Lines.
Line
A Line should be initialised using a string, and should implement Tokens() and PlainString().
Tokens()
PlainString()
The Line should do the tokenisation on demand, cache it when done and throw away the original string after it has been tokenised.
This should improve scrolling-up-and-down performance without too much work.
In profiling,
tokensFromString()
turns up hot when I mouse scroll vigorously up and down.Currently, our
Reader
s providestring
s.What they should provide is
Line
s.A
Line
should be initialised using astring
, and should implementTokens()
andPlainString()
.The
Line
should do the tokenisation on demand, cache it when done and throw away the originalstring
after it has been tokenised.This should improve scrolling-up-and-down performance without too much work.