Android: Accelerate starting AVD a bit

The startAvdRecipe() uses internal polling.
Increase the polling frequency from 1/1s into 1/100ms.
The startup time, tested with closing the emulator after
previous run prior to the next run, decreases by ~20%.

Change-Id: I408a0d628a702056c569b880472516e510ac54e3
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
This commit is contained in:
Jarek Kobus
2024-10-31 21:31:04 +01:00
parent 189f0d1694
commit b7471f58eb

View File

@@ -187,13 +187,13 @@ static ExecutableItem waitForAvdRecipe(const QString &avdName, const Storage<QSt
Forever {
stopOnSuccess,
serialNumberRecipe(avdName, serialNumberStorage),
TimeoutTask([](std::chrono::milliseconds &timeout) { timeout = 1s; }, DoneResult::Error)
TimeoutTask([](std::chrono::milliseconds &timeout) { timeout = 100ms; }, DoneResult::Error)
}.withTimeout(120s),
Forever {
stopStorage,
stopOnSuccess,
isAvdBootedRecipe(serialNumberStorage),
TimeoutTask([](std::chrono::milliseconds &timeout) { timeout = 1s; }, DoneResult::Error),
TimeoutTask([](std::chrono::milliseconds &timeout) { timeout = 100ms; }, DoneResult::Error),
Group {
outputStorage,
AndroidConfig::devicesCommandOutputRecipe(outputStorage),