summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorisanae <14251494+isanae@users.noreply.github.com>2020-02-18 18:09:03 -0500
committerisanae <14251494+isanae@users.noreply.github.com>2020-02-18 18:09:03 -0500
commit75cd8b3bab3e4d094565748215013ee78c9962d9 (patch)
treeb0eb3365f79d090cf13a3144acc1f1b379140dec /src
parente749b2072601830c11495ce210907391dfe7bc6b (diff)
added more timings
missed fileregisterfwd.h in cmake list
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt2
-rw-r--r--src/directoryrefresher.cpp2
-rw-r--r--src/downloadmanager.cpp4
-rw-r--r--src/main.cpp12
-rw-r--r--src/modinfo.cpp2
-rw-r--r--src/organizercore.cpp3
-rw-r--r--src/plugincontainer.cpp2
-rw-r--r--src/pluginlist.cpp2
8 files changed, 24 insertions, 5 deletions
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; i<argc; ++i) {
if (std::strcmp(argv[i], "--crashdump") == 0) {
@@ -954,6 +960,8 @@ int main(int argc, char *argv[])
splash = ":/MO/gui/splash";
}
+ tt.stop();
+
const int result = runApplication(application, instance, splash);
if (result != RestartExitCode) {
return result;
diff --git a/src/modinfo.cpp b/src/modinfo.cpp
index d971f150..5c381830 100644
--- a/src/modinfo.cpp
+++ b/src/modinfo.cpp
@@ -251,6 +251,8 @@ void ModInfo::updateFromDisc(const QString &modDirectory,
bool displayForeign,
MOBase::IPluginGame const *game)
{
+ TimeThis tt("updateFromDisc()");
+
QMutexLocker lock(&s_Mutex);
s_Collection.clear();
s_NextID = 0;
diff --git a/src/organizercore.cpp b/src/organizercore.cpp
index 80df044a..3c499b36 100644
--- a/src/organizercore.cpp
+++ b/src/organizercore.cpp
@@ -1408,7 +1408,8 @@ void OrganizerCore::refreshDirectoryStructure()
void OrganizerCore::directory_refreshed()
{
- log::debug("structure refreshed");
+ log::debug("directory refreshed, finishing up");
+ TimeThis tt("directory_refreshed()");
DirectoryEntry *newStructure = m_DirectoryRefresher->stealDirectoryStructure();
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();