Remote Search very slow against Mailfence #8592
Labels
type: bug
Something is causing incorrect behavior or errors
unconfirmed
Newly reported issues awaiting triage or confirmation
Checklist
App
Thunderbird for Android
App version
8.1
Where did you get the app from?
Google Play
Android version
14
Device model
Google Pixel 5
Steps to reproduce
I suspect this varies by provider. Search works fine against my Gmail account, for example. This is a specific issue with my account provided by Mailfence. (See: https://mailfence.com/)
I suspect it might also be influenced by the fact that the folder being searched, my Inbox, has 32,000 messages in it.
So:
(Some extra notes: the Mailfence account is IMAP-based, and uses Exchange internally.)
Expected behavior
Search does not time out, and returns results.
(As a minor band-aid, display an error message about what happened is displayed.)
Actual behavior
Search eventually times out with no error.
Some extra info:
I cloned the repository and ran it under a debugger to make sure what I was seeing was, in fact, a time-out. It was! When I bumped up
SOCKET_READ_TIMEOUT
inNetworkTimeouts.kt
up to600_000
(from60_000
), I was able to start getting results. In my testing, it took around 130 seconds to start seeing results.In addition, rather than downloading the messages in chunks, it seemed to retrieve them one-by-one, visibly loading quite slowly.
While I'm not well-versed in how IMAP works, I can at least confirm that another Android mail client, AquaMail, has no issues remote-searching against my Mailfence account, and manages to download messages in chunks of 50 (still somewhat slowly, but not two minutes slowly), so I don't think this is only a provider issue.
Logs
I've attached a log of me running in the emulator with my slightly-hacked version that includes my increased timeout.
This is running off the
main
branch from commit42f88165d
.I've included as much of the log as Android Studio's
logcat
preserved (which doesn't seem to be everything starting from boot).You can see where I ran the remote search if you search for the line
2024-11-20 11:16:54.926 7798-7798 MessagingController net.thunderbird.android.debug I searchRemoteMessages (acct = f8ca14db-2db9-44a3-8dcf-27e8a8ee657a, folderId = 2, query = hsl)
.tb-android-log.txt
The text was updated successfully, but these errors were encountered: