diff options
author | Tomasz Moń <desowin@gmail.com> | 2023-01-28 14:49:21 +0100 |
---|---|---|
committer | Tomasz Moń <desowin@gmail.com> | 2023-01-29 10:39:06 +0100 |
commit | 516c69b92188275b571a90d415f95dc4f5e3b5f9 (patch) | |
tree | e7683dc2d929b8490a356da66bba0eed7cad7f1b /ui | |
parent | ac64be57c08b03d17d48265d76929b520ea03040 (diff) |
Qt: Allow caching columns while dissecting color
It is fine to dissect and cache columns data during color dissection if
it won't evict already cached data. There is rather high probability of
using the column data because color information is dissected in order.
Diffstat (limited to 'ui')
-rw-r--r-- | ui/qt/models/packet_list_record.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ui/qt/models/packet_list_record.cpp b/ui/qt/models/packet_list_record.cpp index 17b333b3bd..9c2c66d134 100644 --- a/ui/qt/models/packet_list_record.cpp +++ b/ui/qt/models/packet_list_record.cpp @@ -54,8 +54,9 @@ void PacketListRecord::ensureColorized(capture_file *cap_file) bool dissect_color = !colorized_ || ( color_ver_ != rows_color_ver_ ); if (dissect_color) { - /* Do not dissect columns to avoid thrashing cache */ - dissect(cap_file, false, dissect_color); + /* Dissect columns only if it won't evict anything from cache */ + bool dissect_columns = col_text_cache_.totalCost() < col_text_cache_.maxCost(); + dissect(cap_file, dissect_columns, dissect_color); } } |