Unfortunately, the IMAP command that works like "give me N more matches" is only available with an extension, and one that's pretty rare in the real world.
So the code iterates through the mailbox's entire message range, and asks for "any matches within this range of messages".
Even so, the commands that return no matches should complete pretty quickly (unless you're on a very high latency mobile connection, for example), and you should be seeing the app's search progress update (bottom of the list).
As usual, I'm open to debug logs.