Try to minimize sorting overhead.

Process application events as little as possible while sorting.

Change-Id: I9d779aebf6edaafc1e6af3a99b4a0dac682ea6b6
Reviewed-on: https://code.wireshark.org/review/9722
Reviewed-by: Gerald Combs <gerald@wireshark.org>
This commit is contained in:
Gerald Combs 2015-07-20 13:07:26 -07:00
parent 63edb9904f
commit 7e13cacb9b
1 changed files with 3 additions and 1 deletions

View File

@ -289,9 +289,11 @@ bool PacketListModel::recordLessThan(PacketListRecord *r1, PacketListRecord *r2)
// _packet_list_compare_records, and packet_list_compare_custom from
// gtk/packet_list_store.c into one function
// What's the least amount of processing that we can do which will draw
// the busy indicator?
if (busy_timer_.elapsed() > busy_timeout_) {
busy_timer_.restart();
wsApp->processEvents();
wsApp->processEvents(QEventLoop::ExcludeUserInputEvents | QEventLoop::ExcludeSocketNotifiers, 1);
}
if (sort_column_ < 0) {
// No column.