Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Invalid
-
None
-
None
Description
Auditing IMAP load with glowroot I was surprised to see thousands of calls to the highest Message UID within a mailbox.
For instance out of 500 MOVE commands the highest UID was checked a thousand time...
A deeper look at the code shows that the latest UID is agressively read before a IF loop not requiring it all of the time... When no `*` are specified in the range definition we can entirely skip this read... Which seems quitte of a common pattern!
Impacted commands includes:
- MOVE
- COPY
- STORE
- EXPUNGE
- FETCH
By not performing these reads I expect a minor performance increase...
- Something like7% for MOVE for instance.
I will report other tiny enhancements I can find as comments of this ticket.