Cache results of translateBufferLineToString when it's called for a row within the viewport
Discard when:
The line changes (perhaps just when anything changes?)
The line is no longer in the viewport
This would ensure we're not duplicating calls to translateBufferLineToString for the hot section (viewport) while not blowing out memory by doing this for the entire buffer.
Forked from discussion in https://github.com/xtermjs/xterm.js/issues/1833
Proposal:
This would ensure we're not duplicating calls to translateBufferLineToString for the hot section (viewport) while not blowing out memory by doing this for the entire buffer.