Open Bug 1723509 Opened 3 years ago Updated 3 years ago

WebExtension API: messages.query(queryInfo) slow in TB91

Categories

(Thunderbird :: Add-Ons: Extensions API, enhancement)

Thunderbird 91
enhancement

Tracking

(Not tracked)

UNCONFIRMED

People

(Reporter: bugzilla, Unassigned)

References

(Regression)

Details

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0

Steps to reproduce:

I am reading the release notes of TB91, that messages.query now searches in all messages instead of only the indexed ones. I feel that query may get terribly slow.

I am using it to find parents of a thread by:

console.log(before query);
let queryPage = await messenger.messages.query({ headerMessageId: parentID });
console.log(after query);

Actual results:

Time for one query now:
14:04:17.236 before query
14:04:21.313 after query

For my 4-5GB mails it now takes 4-5 secs, before on indexed only it was in the millisecond area. Sorry, hard to test now.

Expected results:

Can we introduce to search all messages / only indexed messages as an option of queryInfo?

Yes, but not much to do about that. You can't have both correctness and fast.

Regressed by: 1605937

That is why I proposed to let the API user decide: default is slow and correct, optionally only search the indexed messages.
Extensions could even decide to pass the option to the user.

You need to log in before you can comment on or make changes to this bug.