From dc98914eef173505c6132d1eed29d9db80447d35 Mon Sep 17 00:00:00 2001 From: baldurk Date: Wed, 10 Jan 2018 14:06:07 +0000 Subject: [PATCH] Don't add android hosts synchronously in menu popup (it started slowing) * This was fast before but I started noticing the lag. Instead, we can do it asynchronously when polling for remote host status, every few seconds. This should still be good enough as people are probably going to be used to devices taking a moment to appear. --- qrenderdoc/Windows/MainWindow.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qrenderdoc/Windows/MainWindow.cpp b/qrenderdoc/Windows/MainWindow.cpp index 3a39fe860..f4116497e 100644 --- a/qrenderdoc/Windows/MainWindow.cpp +++ b/qrenderdoc/Windows/MainWindow.cpp @@ -1380,6 +1380,8 @@ void MainWindow::remoteProbe() { if(!m_Ctx.IsCaptureLoaded() && !m_Ctx.IsCaptureLoading()) { + GUIInvoke::call([this] { m_Ctx.Config().AddAndroidHosts(); }); + for(RemoteHost *host : m_Ctx.Config().RemoteHosts) { // don't mess with a host we're connected to - this is handled anyway @@ -1463,8 +1465,6 @@ void MainWindow::messageCheck() void MainWindow::FillRemotesMenu(QMenu *menu, bool includeLocalhost) { - m_Ctx.Config().AddAndroidHosts(); - menu->clear(); for(int i = 0; i < m_Ctx.Config().RemoteHosts.count(); i++)