linagora / james-project

Mirror of Apache James Project
Apache License 2.0
72 stars 62 forks source link

IMAP Fetch: UidMSNConverter :: get MSN is slow #3861

Closed chibenwa closed 4 years ago

chibenwa commented 4 years ago

What?

Following openpaas-1.7.15-rc2 deployment, and the use of VAVR immutable datastructures in UidMsnConverter, I notice some offending slow FETCH requests.

Capture d’écran de 2020-10-05 09-11-55.png

A closer look shows Cassandra is not to blame here

Capture d’écran de 2020-10-05 09-10-00.png

Flame graphs correlate the analysis

Capture d’écran de 2020-10-05 09-10-05.png

Micro - benchmarks show breakage in performance from 8.000.000 mails locally.

Short term reaction

Arsnael commented 4 years ago

Let's revert for now if it's an issue yes, and monitor that part again :)

chibenwa commented 4 years ago

N (for each message) * Log(N) access in a RedBlack tree

VS

N (for each message) * O(1) access in an array

chibenwa commented 4 years ago

https://issues.apache.org/jira/browse/JAMES-3403