aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt/packet_list_record.h
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_record.h
parentc088135d5ba1846e2a7c20d6121c4352a83e68b9 (diff)
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_record.h')
-rw-r--r--ui/qt/packet_list_record.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/ui/qt/packet_list_record.h b/ui/qt/packet_list_record.h
index c8d2e90a28..7c23c43ea8 100644
--- a/ui/qt/packet_list_record.h
+++ b/ui/qt/packet_list_record.h
@@ -36,6 +36,7 @@
#include <QVariant>
struct conversation;
+struct _GStringChunk;
class PacketListRecord
{
@@ -55,9 +56,11 @@ public:
inline int lineCount() { return lines_; }
inline int lineCountChanged() { return line_count_changed_; }
+ static void clearStringPool();
+
private:
/** The column text for some columns */
- QList<QByteArray> col_text_;
+ QList<const char *> col_text_;
frame_data *fdata_;
int lines_;
@@ -75,6 +78,9 @@ private:
void dissect(capture_file *cap_file, bool dissect_color = false);
void cacheColumnStrings(column_info *cinfo);
+
+ static struct _GStringChunk *string_pool_;
+
};
#endif // PACKET_LIST_RECORD_H