From d2dc0aa1b1a82b0f833756820986c6402bbeedeb Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Sun, 1 Oct 2023 16:13:22 -0500 Subject: [PATCH] Don't serialize apps for the host backup This takes a ton of time on macOS and most of the data is just a local cache anyway --- app/backend/computermanager.cpp | 4 ++-- app/backend/nvcomputer.cpp | 2 +- app/backend/nvcomputer.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/backend/computermanager.cpp b/app/backend/computermanager.cpp index 45f6fe5d..7a82f6c9 100644 --- a/app/backend/computermanager.cpp +++ b/app/backend/computermanager.cpp @@ -273,7 +273,7 @@ void DelayedFlushThread::run() { int i = 0; for (const NvComputer* computer : m_ComputerManager->m_KnownHosts) { settings.setArrayIndex(i++); - computer->serialize(settings); + computer->serialize(settings, false); } } settings.endArray(); @@ -286,7 +286,7 @@ void DelayedFlushThread::run() { int i = 0; for (const NvComputer* computer : m_ComputerManager->m_KnownHosts) { settings.setArrayIndex(i++); - computer->serialize(settings); + computer->serialize(settings, true); } } settings.endArray(); diff --git a/app/backend/nvcomputer.cpp b/app/backend/nvcomputer.cpp index 8486a003..693111ee 100644 --- a/app/backend/nvcomputer.cpp +++ b/app/backend/nvcomputer.cpp @@ -74,7 +74,7 @@ void NvComputer::setRemoteAddress(QHostAddress address) this->remoteAddress = NvAddress(address, this->externalPort); } -void NvComputer::serialize(QSettings& settings) const +void NvComputer::serialize(QSettings& settings, bool serializeApps) const { QReadLocker lock(&this->lock); diff --git a/app/backend/nvcomputer.h b/app/backend/nvcomputer.h index 9c959f54..e90fe1a8 100644 --- a/app/backend/nvcomputer.h +++ b/app/backend/nvcomputer.h @@ -49,7 +49,7 @@ public: uniqueAddresses() const; void - serialize(QSettings& settings) const; + serialize(QSettings& settings, bool serializeApps) const; enum PairState {