It is interesting to know whether a derivation path has any transactions, even if we are not sure about the exact number of txs.
Also it is likely that the timeout happens during the merkle verification when the whole transaction history is already downloaded.
I will try to fix the root cause in a different diff, because it seems to me that the tool should not timeout on wallets with only a few hundreds of transactions, but this change is still useful because we cannot reasonably make the user wait for full synchronization for much larger wallets with tens of thousands of transactions.