Xterm.js: Infinite scrollback?

Created on 10 May 2019  Â·  3Comments  Â·  Source: xtermjs/xterm.js

We already had several requests regarding an infinite scrollback, vte also supports this in newer versions, so I'd like to discuss if this should be a goal at all.

Technically its possible to achieve this by utilizing the localStorage of the browser, which takes care of memory consumption and paging of the stuff to the filesystem. We still would have to implement our own lightweight paging gateway that can CRUD buffer content into this storage backend and can fetch/update render data accordingly.

I for myself think that we dont need this, it also raises some questions like high footprint on filesystem and usability issues of the scrollbar (it will jump like crazy for small movements for very very long terminal sessions).
Still I'd like to hear your thoughts, maybe @egmontkob can give some further insights about more hassles/solutions as well.

@Tyriar, @mofux

areaccessibility typproposal

Most helpful comment

Our (VTE) scrollback format is extremely complicated – actually, supporting _finite_ scrollback makes it even more complicated, supporting infinite only would be simpler. Ping me if you consider this feature again, I'll be happy to explain the details, although you probably wouldn't take it as reference for your implementation.

Allegedly this was an often requested feature for us as well, but I don't have personal experience about it. It was implemented before I joined the project. I use a finite 50.000 lines myself and find it an overkill.

I don't think the scrollbar usability is an issue; or if it is, it is already at a few thousand lines. Dragging the scrollbar can only do rough positioning which I personally seldom use, for fine-grained I prefer two-finger scrolling over the terminal area using my laptop's touchpad.

All 3 comments

Local storage is also restricted to 5mb and will start evicting data once that cap is reached, so it could be removing actually important stuff 😛. I don't think this is particularly important especially considering that it would complicate the implementation a bit to support such paging, plus you can essentially workaround it by upping scrollback. There are much bigger issues to tackle first before we even think about this imo.

Let's call this out of scope for now for the reasons mentioned above. Also we had an issue about this in the past and allowed a much larger scrollback side as a workaround https://github.com/xtermjs/xterm.js/issues/948

Our (VTE) scrollback format is extremely complicated – actually, supporting _finite_ scrollback makes it even more complicated, supporting infinite only would be simpler. Ping me if you consider this feature again, I'll be happy to explain the details, although you probably wouldn't take it as reference for your implementation.

Allegedly this was an often requested feature for us as well, but I don't have personal experience about it. It was implemented before I joined the project. I use a finite 50.000 lines myself and find it an overkill.

I don't think the scrollbar usability is an issue; or if it is, it is already at a few thousand lines. Dragging the scrollbar can only do rough positioning which I personally seldom use, for fine-grained I prefer two-finger scrolling over the terminal area using my laptop's touchpad.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Tyriar picture Tyriar  Â·  4Comments

fabiospampinato picture fabiospampinato  Â·  4Comments

tandatle picture tandatle  Â·  3Comments

kolbe picture kolbe  Â·  3Comments

travisobregon picture travisobregon  Â·  3Comments