Closed Bug 1770858 Opened 3 years ago Closed 3 years ago

High CPU usage very often for long time compacting a given folder again and again, which is frequently receiving redownloaded messages

Categories

(Thunderbird :: General, defect)

Thunderbird 91
defect

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: php4funs, Unassigned)

References

Details

(Keywords: perf)

User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.54 Safari/537.36

Steps to reproduce:

nothing

Actual results:

Starting recently, it often happens that thunderbird start consuming a lot of CPU for periods of several minutes (like half an hour) several times a day for apparently no reason. It gets my attention because the cooling fan of the computer starts spinning faster and becomes audible.
Every time this happens, I check what process is consuming a lot of CPU and it's Thunderbird, then I go to Thunderbird's activity manager and it's always "indexing folder xxxx" where xxxx is always the same folder.

All this is with pop3.

  • That folder has about 8k messages, which is not very many, and they are all around 3kB each in size. There were times in the past when I had hundreds of thousands of messages in that folder, but that was long ago, it's no longer the case, and it's been compacted since. My inbox has more messages than that, and I never catch Thunderbird consuming lots of CPU indexing the inbox folder.

  • that folder does not receive a big volume of new messages all the time. It does get some. I have a filter that moves some of the incoming messages to that folder automatically when they are downloaded. Typically I receive like 20-30 such messages in a day that get moved to that folder, say between 1 and 10 at a time.

Now I see it in the history of the activity manager: "indexed 6437 messages in [that folder]" several times a day (not always the same number, it varies slightly, and it's not equal to the total number of messages in the folder, but it's not much less), always shortly after the "Moved N messages from Inbox to [that folder]", where N is typically between 1 and 10.

So, it looks like every time Thunderbird gets new messages, and moves a small number of them into that folder because of the filter, for some reason it feels the need to reindex almost (but not quite) the entire folder, several thousands messages.

Also, 50% CPU on an i7 for half an hour wouldn't seem reasonable even for indexing a few thousand messages of a few dozens lines each.

Expected results:

When a small number of new messages are downloaded and moved into that folder, at the very most you may need to index those messages, which should take a negligible amount of work that wouldn't be noticeable in overall CPU consumption.

Component: Untriaged → General
Keywords: perf
See Also: → 1779273

Sounds more like an imap problem rather than a compact issue

Are you still experiencing this problem?

Flags: needinfo?(php4funs)
Summary: High CPU usage very often for long time compacting a given folder again and again → High CPU usage very often for long time compacting a given folder again and again, which is frequently receiving redownloaded messages
Whiteboard: [closeme 2022-08-25]

If you still see this when using version 102, please create a performance profile and the procedure at https://support.mozilla.org/en-US/kb/profiling-thunderbird-performance

Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
Flags: needinfo?(php4funs)
Resolution: --- → INCOMPLETE
Whiteboard: [closeme 2022-08-25]
You need to log in before you can comment on or make changes to this bug.