Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remote Search very slow against Mailfence #8592

Open
2 tasks done
pingzing opened this issue Nov 20, 2024 · 0 comments
Open
2 tasks done

Remote Search very slow against Mailfence #8592

pingzing opened this issue Nov 20, 2024 · 0 comments
Labels
type: bug Something is causing incorrect behavior or errors unconfirmed Newly reported issues awaiting triage or confirmation

Comments

@pingzing
Copy link

pingzing commented Nov 20, 2024

Checklist

  • I have used the search function to see if someone else has already submitted the same bug report.
  • I will describe the problem with as much detail as possible.

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:

  1. Using an account from Mailfence
  2. With a (very?) large number of messages in the Inbox
  3. Perform a remote search that should return some number of results.
  4. Wait for search to time out. (Note that no error message is displayed.)

(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 in NetworkTimeouts.kt up to 600_000 (from 60_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 commit 42f88165d.

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

@pingzing pingzing added type: bug Something is causing incorrect behavior or errors unconfirmed Newly reported issues awaiting triage or confirmation labels Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something is causing incorrect behavior or errors unconfirmed Newly reported issues awaiting triage or confirmation
Projects
None yet
Development

No branches or pull requests

1 participant