Save hosts on a separate thread

QSettings on macOS Ventura performs horribly when saving a lot of values
(like several hosts or a host with a large app list). This change considerably
improves UI performance by moving the long operation off the main thread.
This commit is contained in:
Cameron Gutman committed 2022-10-25 00:07:07 -05:00
1 parent cb04925c6e
commit cebd3bf751
2 files changed
+39 -12

No files matched your search

+2
View File
@@ -167,6 +167,7 @@ class ComputerManager : public QObject
friend class DeferredHostDeletionTask;
friend class PendingAddTask;
friend class PendingPairingTask;
friend class DeferredHostSaveTask;
public:
explicit ComputerManager(QObject *parent = nullptr);
@@ -228,4 +229,5 @@ private:
QMdnsEngine::Cache m_MdnsCache;
QVector<MdnsPendingComputer*> m_PendingResolution;
CompatFetcher m_CompatFetcher;
QAtomicInteger<bool> m_HostsListDirty;
};