forked from qt-creator/qt-creator
Android: Speed up project opening by caching the sdk version
The slowness is due to AndroidToolChain::addToEnvironment() being called a lot on project opening. Thus we need to avoid any file opening or process on loading. This patch does 2 things: a) It removes the call to sdkTargets() which is unneeded. That actually checks which avds are available. b) It caches the target sdk inside a named target setting. That means, we assume that the file does not change behind our backs. Task-number: QTCREATORBUG-9164 Change-Id: I9287934a0624db0b3e8318b8cf76e605418850c2 Reviewed-by: Aurindam Jana <aurindam.jana@digia.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
@@ -118,8 +118,6 @@ void AndroidQtVersion::addToEnvironment(const ProjectExplorer::Kit *k, Utils::En
|
||||
if (AndroidConfigurations::instance().config().ndkLocation.isEmpty()
|
||||
|| AndroidConfigurations::instance().config().sdkLocation.isEmpty())
|
||||
return;
|
||||
if (AndroidConfigurations::instance().sdkTargets().isEmpty())
|
||||
return;
|
||||
|
||||
env.set(QLatin1String("ANDROID_NDK_PLATFORM"),
|
||||
AndroidConfigurations::instance().bestMatch(AndroidManager::targetSDK(target)));
|
||||
|
||||
Reference in New Issue
Block a user