[Konsole-devel] Review Request: patch to reduce memory usage for fixed-size history in konsole
mick22 at gmx.at
mick22 at gmx.at
Mon Jun 8 20:01:29 UTC 2009
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/802/
-----------------------------------------------------------
(Updated 2009-06-08 13:01:29.518830)
Review request for Konsole.
Changes
-------
Implemented formatting array as suggested in https://bugs.kde.org/show_bug.cgi?id=176974#c20
Legacy storage format (still used in v1 of the patch) has been removed.
Summary
-------
Here's a patch that drastically reduces mem usage when a fixed size history is
used:
- new history storage type "HistoryTypeQList" (QList-based) set as replacement for HistoryTypeBuffer
- compact storage for history lines
History lines are stored as an array of chars when possible (i.e. when
color and rendition flag of all characters in the line are equal). 2 bytes per character + overhead
When not (easily) possible, it falls back to the current way of storing history lines (array of QVector<Character>). 11 bytes per character + overhead
Memory usage has been cut down from about 171MB to 55MB for a konsole process
with 5 tabs, 30000 lines scrollback, 65 chars per line.
This addresses bug 176974.
https://bugs.kde.org/show_bug.cgi?id=176974
Diffs (updated)
-----
trunk/KDE/kdebase/apps/konsole/src/History.h 978945
trunk/KDE/kdebase/apps/konsole/src/History.cpp 978945
trunk/KDE/kdebase/apps/konsole/src/SessionController.cpp 978945
trunk/KDE/kdebase/apps/konsole/src/SessionManager.cpp 978945
Diff: http://reviewboard.kde.org/r/802/diff
Testing
-------
reasonably tested
Thanks,
mick22
More information about the konsole-devel
mailing list