diff options
author | Gerald Combs <gerald@wireshark.org> | 2016-03-30 17:24:44 -0700 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2016-04-02 00:26:26 +0000 |
commit | a2c042471b86499606028fa09208c0f3df1cf07a (patch) | |
tree | 8eff7b95d6abed3ddfbad79d638780f62b41cfae /ui/qt/main_window.h | |
parent | e6a65afd3ee567f743e6b2f4f8596f27445ed390 (diff) | |
download | wireshark-a2c042471b86499606028fa09208c0f3df1cf07a.tar.gz |
Qt: Lazily create dialogs.
According to the Visual Studio 2013 profiler here, we spend about 4% of
our startup time creating the Capture Interfaces dialog. Hold off on
doing that until the user wants to see the dialog. Do the same for the
File Set dialog.
While we're here, make sure MainWindow has fewer children when setupUi
is called. setupUi calls connectSlotsByName, which iterates over all
child objects.
Change-Id: I253e6dc5b7e73a6cb7b7036637e336f449449c4a
Reviewed-on: https://code.wireshark.org/review/14732
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_window.h')
-rw-r--r-- | ui/qt/main_window.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ui/qt/main_window.h b/ui/qt/main_window.h index f21e7cd9a6..235011fe57 100644 --- a/ui/qt/main_window.h +++ b/ui/qt/main_window.h @@ -53,15 +53,15 @@ #include "capture_file.h" #include "capture_file_dialog.h" #include "capture_file_properties_dialog.h" -#include "capture_interfaces_dialog.h" #include "display_filter_combo.h" -#include "file_set_dialog.h" #include "filter_action.h" #include "follow_stream_dialog.h" #include "preferences_dialog.h" class AccordionFrame; class ByteViewTab; +class CaptureInterfacesDialog; +class FileSetDialog; class FunnelStatistics; class MainWelcome; class PacketList; @@ -143,7 +143,7 @@ private: PacketList *packet_list_; ProtoTree *proto_tree_; QWidget *previous_focus_; - FileSetDialog file_set_dialog_; + FileSetDialog *file_set_dialog_; ByteViewTab *byte_view_tab_; QWidget empty_pane_; QActionGroup *show_hide_actions_; @@ -159,7 +159,7 @@ private: bool capture_filter_valid_; #ifdef HAVE_LIBPCAP capture_session cap_session_; - CaptureInterfacesDialog capture_interfaces_dialog_; + CaptureInterfacesDialog *capture_interfaces_dialog_; info_data_t info_data_; #endif |