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.
Details
Details
- Reviewers
swills tcberner feld - Group Reviewers
kde - Commits
- rP434831: Fixes for Konsole
this has seen a couple months of heavy daily use on my system, more than sufficient to be confident of the correctness
Diff Detail
Diff Detail
- Repository
- rP FreeBSD ports repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Comment Actions
Seems fine.
You should upstream the parts that have not yet been so: https://phabricator.kde.org/
Comment Actions
I think it would be best to split this into three commits (scrollback, patch-comment and cursor fix).