diff options
author | Gerald Combs <gerald@wireshark.org> | 2015-09-10 23:06:12 +0000 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2015-09-11 17:34:53 +0000 |
commit | 2931dc118b6c9090e03480811c38ca582f20f8f3 (patch) | |
tree | bbb2f70b0405a08fd39bfb6920eb2d166d0685fa /ui/qt/packet_list_model.cpp | |
parent | c088135d5ba1846e2a7c20d6121c4352a83e68b9 (diff) | |
download | wireshark-2931dc118b6c9090e03480811c38ca582f20f8f3.tar.gz |
Try using GStringChunks in PacketListRecord.
This saves a fair amount of memory in tests here. Loading a large
capture file and sorting on a custom column (tcp.window_size) uses 676
MB before the change and 634 after.
Add notes about possble further improvements:
Roll our own replacement for GStringChunks using wmem_tree.
Have PacketListRecord::columnString return a const char * instead of a
const QByteArray.
Change-Id: Icb36194f5ad290828d7106ccc3bf494d07d76d08
Reviewed-on: https://code.wireshark.org/review/10476
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'ui/qt/packet_list_model.cpp')
-rw-r--r-- | ui/qt/packet_list_model.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ui/qt/packet_list_model.cpp b/ui/qt/packet_list_model.cpp index 699ffe5c6e..5b10900158 100644 --- a/ui/qt/packet_list_model.cpp +++ b/ui/qt/packet_list_model.cpp @@ -51,6 +51,7 @@ PacketListModel::PacketListModel(QObject *parent, capture_file *cf) : line_spacing_(0) { setCaptureFile(cf); + PacketListRecord::clearStringPool(); connect(this, SIGNAL(itemHeightChanged(QModelIndex)), this, SLOT(emitItemHeightChanged(QModelIndex)), Qt::QueuedConnection); @@ -114,6 +115,7 @@ void PacketListModel::clear() { physical_rows_.clear(); visible_rows_.clear(); number_to_row_.clear(); + PacketListRecord::clearStringPool(); endResetModel(); } |