summaryrefslogtreecommitdiff
path: root/ui/qt/packet_list_model.cpp
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2015-09-10 23:06:12 +0000
committerGerald Combs <gerald@wireshark.org>2015-09-11 17:34:53 +0000
commit2931dc118b6c9090e03480811c38ca582f20f8f3 (patch)
treebbb2f70b0405a08fd39bfb6920eb2d166d0685fa /ui/qt/packet_list_model.cpp
parentc088135d5ba1846e2a7c20d6121c4352a83e68b9 (diff)
downloadwireshark-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.cpp2
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();
}