diff options
author | Gerald Combs <gerald@wireshark.org> | 2015-08-26 17:14:39 -0700 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2015-08-28 02:54:20 +0000 |
commit | f19a173a8409ff62a77939e66b4a97d26cc5c149 (patch) | |
tree | 9530c97f8ebafd0d0a791cf1f08aa5f4e90fcdb7 /ui/qt/main_status_bar.cpp | |
parent | 01fb470acd71528bede068727b7614ae6f534c4f (diff) | |
download | wireshark-f19a173a8409ff62a77939e66b4a97d26cc5c149.tar.gz |
Speed up column sorting.
The GTK+ UI sequentially dissects and caches column strings for all rows
before sorting a column. Do the same in the Qt UI, which can improve
performance considerably.
Don't colorize packets when sorting in the Qt UI unless it's necessary.
When sorting in the Qt UI, let the user cancel the initial packet
dissection. Note that we'll need to replace std::sort in order to
cancel out of sorting.
Use a pre-allocated and pre-compiled GRexex when we prime columns. Note
that we probably shouldn't parse a regular expression there.
Cache the last result of proto_registrar_get_byname.
Note performance hot spots elsewhere in the code.
To do:
GeoIP in packet-ip.c is pretty slow.
Bug: 11467
Change-Id: Ib34038fee08ef0319261faeffc4eca01e52f4bd3
Reviewed-on: https://code.wireshark.org/review/10275
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'ui/qt/main_status_bar.cpp')
-rw-r--r-- | ui/qt/main_status_bar.cpp | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/ui/qt/main_status_bar.cpp b/ui/qt/main_status_bar.cpp index 1a43712805..9802294be7 100644 --- a/ui/qt/main_status_bar.cpp +++ b/ui/qt/main_status_bar.cpp @@ -52,7 +52,7 @@ enum StatusContext { STATUS_CTX_FIELD, STATUS_CTX_BYTE, STATUS_CTX_FILTER, - STATUS_CTX_BUSY, + STATUS_CTX_PROGRESS, STATUS_CTX_TEMPORARY }; @@ -339,14 +339,14 @@ void MainStatusBar::pushProfileName() void MainStatusBar::pushBusyStatus(const QString &message, const QString &messagetip) { - info_status_.pushText(message, STATUS_CTX_BUSY); + info_status_.pushText(message, STATUS_CTX_PROGRESS); info_status_.setToolTip(messagetip); progress_frame_.showBusy(true, false, NULL); } void MainStatusBar::popBusyStatus() { - info_status_.popText(STATUS_CTX_BUSY); + info_status_.popText(STATUS_CTX_PROGRESS); info_status_.setToolTip(QString()); progress_frame_.hide(); } @@ -355,6 +355,23 @@ void MainStatusBar::popProfileStatus() { profile_status_.popText(STATUS_CTX_MAIN); } +void MainStatusBar::pushProgressStatus(const QString &message, bool animate, bool terminate_is_stop, gboolean *stop_flag) +{ + info_status_.pushText(message, STATUS_CTX_PROGRESS); + progress_frame_.showProgress(animate, terminate_is_stop, stop_flag); +} + +void MainStatusBar::updateProgressStatus(int value) +{ + progress_frame_.setValue(value); +} + +void MainStatusBar::popProgressStatus() +{ + info_status_.popText(STATUS_CTX_PROGRESS); + progress_frame_.hide(); +} + void MainStatusBar::updateCaptureStatistics(capture_session *cap_session) { QString packets_str; |