Page MenuHomeFreeBSD

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

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

Details

Reviewers
swills
tcberner
feld
Group Reviewers
kde
Commits
rP434831: Fixes for Konsole
Summary

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

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

Event Timeline

rezny updated this revision to Diff 25604.Feb 22 2017, 10:53 PM
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: https://phabricator.kde.org/

tcberner accepted this revision.Feb 23 2017, 1:34 PM
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
mat added a comment.Feb 24 2017, 2:00 PM

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

rezny updated this revision to Diff 25687.Feb 25 2017, 3:06 PM
rezny edited edge metadata.

bump PORTREVISION

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

Approved

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.