xtermjs / xterm.js

A terminal for the web
https://xtermjs.org/
MIT License
17.56k stars 1.62k forks source link

Cache translateBufferLineToString results for viewport #1836

Open Tyriar opened 5 years ago

Tyriar commented 5 years ago

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.

jerch commented 5 years ago

Ah sweet, I like the discard rules and limiting it to the viewport. It would at least deal with the linkifier and the lineFeed consumer well.