From 75cd8b3bab3e4d094565748215013ee78c9962d9 Mon Sep 17 00:00:00 2001 From: isanae <14251494+isanae@users.noreply.github.com> Date: Tue, 18 Feb 2020 18:09:03 -0500 Subject: added more timings missed fileregisterfwd.h in cmake list --- src/CMakeLists.txt | 2 ++ src/directoryrefresher.cpp | 2 +- src/downloadmanager.cpp | 4 +++- src/main.cpp | 12 ++++++++++-- src/modinfo.cpp | 2 ++ src/organizercore.cpp | 3 ++- src/plugincontainer.cpp | 2 ++ src/pluginlist.cpp | 2 ++ 8 files changed, 24 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 85d8af0f..d1430963 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -293,6 +293,7 @@ SET(organizer_HDRS shared/fileentry.h shared/filesorigin.h shared/fileregister.h + shared/fileregisterfwd.h shared/originconnection.h shared/util.h shared/appconfig.h @@ -481,6 +482,7 @@ set(register shared/fileentry shared/filesorigin shared/fileregister + shared/fileregisterfwd shared/originconnection directoryrefresher ) diff --git a/src/directoryrefresher.cpp b/src/directoryrefresher.cpp index e8c26c90..5a3cca5c 100644 --- a/src/directoryrefresher.cpp +++ b/src/directoryrefresher.cpp @@ -463,7 +463,7 @@ void DirectoryRefresher::addMultipleModsFilesToStructure( void DirectoryRefresher::refresh() { SetThisThreadName("DirectoryRefresher"); - TimeThis tt("refresh"); + TimeThis tt("DirectoryRefresher::refresh()"); auto* p = new DirectoryRefreshProgress(this); { diff --git a/src/downloadmanager.cpp b/src/downloadmanager.cpp index a93182b4..4defd96b 100644 --- a/src/downloadmanager.cpp +++ b/src/downloadmanager.cpp @@ -320,6 +320,8 @@ void DownloadManager::setPluginContainer(PluginContainer *pluginContainer) void DownloadManager::refreshList() { + TimeThis tt("DownloadManager::refreshList()"); + try { //avoid triggering other refreshes startDisableDirWatcher(); @@ -1873,7 +1875,7 @@ void DownloadManager::nxmFileInfoFromMd5Available(QString gameName, QVariant use //Unable to determine the correct mod / file. Revert to the old method if (chosenIdx < 0) { //don't use the normal state set function as we don't want to create a meta file - info->m_State = DownloadManager::STATE_READY; + info->m_State = DownloadManager::STATE_READY; queryInfo(m_ActiveDownloads.indexOf(info)); return; } diff --git a/src/main.cpp b/src/main.cpp index 105299a8..8813aaa7 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -506,6 +506,8 @@ static QString getVersionDisplayString() int runApplication(MOApplication &application, SingleInstance &instance, const QString &splashPath) { + TimeThis tt("runApplication() to exec()"); + log::info( "starting Mod Organizer version {} revision {} in {}, usvfs: {}", getVersionDisplayString(), GITID, QCoreApplication::applicationDirPath(), @@ -703,7 +705,7 @@ int runApplication(MOApplication &application, SingleInstance &instance, } QPixmap pixmap; - + QSplashScreen splash(nullptr); if (useSplash) { @@ -748,13 +750,15 @@ int runApplication(MOApplication &application, SingleInstance &instance, log::debug("displaying main window"); mainWindow.show(); mainWindow.activateWindow(); - + if (useSplash) { // don't pass mainwindow as it just waits half a second for it // instead of proceding splash.finish(nullptr); } + tt.stop(); + res = application.exec(); mainWindow.close(); @@ -855,6 +859,8 @@ void initLogging() int main(int argc, char *argv[]) { + TimeThis tt("main to runApplication()"); + // handle --crashdump first for (int i=1; istealDirectoryStructure(); Q_ASSERT(newStructure != m_DirectoryStructure); diff --git a/src/plugincontainer.cpp b/src/plugincontainer.cpp index 767d3eb8..3227f496 100644 --- a/src/plugincontainer.cpp +++ b/src/plugincontainer.cpp @@ -249,6 +249,8 @@ const PreviewGenerator &PluginContainer::previewGenerator() const void PluginContainer::loadPlugins() { + TimeThis tt("PluginContainer::loadPlugins()"); + unloadPlugins(); for (QObject *plugin : QPluginLoader::staticInstances()) { diff --git a/src/pluginlist.cpp b/src/pluginlist.cpp index 4b2eedbd..d58b1c22 100644 --- a/src/pluginlist.cpp +++ b/src/pluginlist.cpp @@ -174,6 +174,8 @@ void PluginList::refresh(const QString &profileName , const QString &lockedOrderFile , bool force) { + TimeThis tt("PluginList::refresh()"); + if (force) { m_ESPs.clear(); m_ESPsByName.clear(); -- cgit v1.3.1