Page MenuHomeFreeBSD

Improve the "unlimited" scrollback in x11/konsole to be less limited

Authored by rezny on Feb 22 2017, 10:53 PM.


Group Reviewers
rP434831: Fixes for Konsole

Konsole provides options for in-memory scrollback, with a specified maximum lines that can be set as high as 1 million lines, or file-based "unlimited" scrollback. However, the file-based option was implemented using 32bit offsets for file I/O, so at most 2GB worth of character data can be stored. At 4 bytes per character, assuming 80 column lines yields a maximum of ~6.5 million lines, not that much more than the in-memory scrollback. To make the "unlimited" scrollback less limited, I have reimplemented the file-backed history using Qt's file I/O routines, which not only use 64bit offsets but which are buffered and thus should perform better. I replaced the mmap of the file with use of Qt's map function to ensure consistency (use of mmap led to reading past the end of the file when recent history was still buffered). Also, the overflow of the readWriteBalance variable was fixed to prevent spontaneous mapping during high write load or unmapping during high read (rapid scrolling) that would occur when the counter flipped over.

Test Plan

this has seen a couple months of heavy daily use on my system, more than sufficient to be confident of the correctness

Diff Detail

rP FreeBSD ports repository
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

rezny retitled this revision from to Improve the "unlimited" scrollback in x11/konsole to be less limited.
rezny updated this object.
rezny edited the test plan for this revision. (Show Details)
rezny added reviewers: kde, swills, feld.

Seems fine.

You should upstream the parts that have not yet been so:

tcberner added a reviewer: tcberner.

I think it would be best to split this into three commits (scrollback, patch-comment and cursor fix).

This revision is now accepted and ready to land.Feb 23 2017, 1:34 PM

Also, PORTREVISION MUST be bumped each time the resulting package changes.

rezny edited edge metadata.


This revision now requires review to proceed.Feb 25 2017, 3:06 PM
swills edited edge metadata.


This revision is now accepted and ready to land.Feb 25 2017, 5:06 PM
This revision was automatically updated to reflect the committed changes.