Open Bug 1869260 Opened 7 months ago Updated 29 days ago

Massive jank in Daily in the main thread, due to nsImapMailFolder::InitiateAutoSync (with server side folders)

Categories

(Thunderbird :: General, defect)

defect

Tracking

(Not tracked)

People

(Reporter: emilio, Unassigned)

References

(Depends on 1 open bug)

Details

(Keywords: perf)

See https://share.firefox.dev/41eJsZn. This happens regularly enough to be super annoying :'(

I guess that's because I had a long weekend so a lot of pending email to download. But still, probably shouldn't block the main thread for seconds at a time...

Maybe ChromeUtils.idleDispatch around here could help: https://searchfox.org/comm-central/rev/76be3830816c8a07044e4d19eb1a31685ec5a2ff/mail/components/activity/modules/autosync.jsm#81
Looks like nsAutoSyncManager is trying back off in a few places. Not convinced it's succeeding...

It's already using idle dispatch, it's just blocking for too long... Maybe the parsing (which is what takes the most time) can move off the main thread?

Is this the Thunderbird instance with large number of messages going through server side filters?

Flags: needinfo?(emilio)
Keywords: perf
See Also: → 436615

Yeah.

Flags: needinfo?(emilio)

What are your settings for mail.check_all_imap_folders_for_new and "check for new messages every" ?

  • Ref Bug 729504 - mail.check_all_imap_folders_for_new enabled and low value for "check for new messages every" yields high mork activity and frequent short hangs when writing mail.

Any body matching filter rules?

  • Ref Bug 971401 - Severe delay with body matching rule exists(Body condition, with Apply filter on/Getting New Mail/Filter before Junk Classification) and autosync enabled, processing only 1 message at a time, ~50% CPU
Depends on: tb-mainthreadio
Flags: needinfo?(emilio)
See Also: → 1819895

(In reply to Wayne Mery (:wsmwk) from comment #6)

What are your settings for mail.check_all_imap_folders_for_new and "check for new messages every" ?

  • mail.check_all_imap_folders_for_new is not set.
  • check for new messages every 10 minutes on all my accounts (5 of them)

Any body matching filter rules?

No thunderbird-side filter rules, all the filter rules are in the mail server.

Flags: needinfo?(emilio)

(In reply to Magnus Melin [:mkmelin] from comment #2)

...
Looks like nsAutoSyncManager is trying back off in a few places. Not convinced it's succeeding...

What do you mean "not succeeding"?

Flags: needinfo?(mkmelin+mozilla)

(In reply to Emilio Cobos Álvarez (:emilio) from comment #3)

It's already using idle dispatch, it's just blocking for too long... Maybe the parsing (which is what takes the most time) can move off the main thread?

The mork parsing can't easily be changed. But we want to get rid of mork...

Flags: needinfo?(mkmelin+mozilla)

(In reply to Emilio Cobos Álvarez (:emilio) from comment #0)

See https://share.firefox.dev/41eJsZn. This happens regularly enough to be super annoying :'(

Looking at this more closely there are

So I'm not sure mork is the main issue here. Unlike https://share.firefox.dev/3U8P0mB, which I've lost track of where it came from.

FWIW mork nastiness with server side filters goes way back to bug 589310

See Also: → 589310
Summary: Massive jank in Daily in the main thread, due to nsImapMailFolder::InitiateAutoSync → Massive jank in Daily in the main thread, due to nsImapMailFolder::InitiateAutoSync (with server side folders)
See Also: → 1888976
See Also: → 1891416

If you using imap, and are able, please try beta https://www.thunderbird.net/en-US/download/beta/

Flags: needinfo?(emilio)

Or of course daily.

I'm using Daily. Seems a bit better, will update the bug next time something like this happens.

Flags: needinfo?(emilio)
You need to log in before you can comment on or make changes to this bug.