Collect required lines instead of using them all
Closed this issue · 0 comments
1Computer1 commented
Right now, all the source lines are just put into an array and indexed into when necessary. This of course forces the entire list of lines, which is not the best for performance nor space. Instead, we could collect all the required lines into an IntMap
or similar by using the line numbers and styling options from the given Errata
.
The makeSourceLines
function within the renderSourceLines
function contains the logic for which lines are required. It might also be worth investigating refactoring the entire renderSourceLines
function so that it isn't so big.