linagora / james-project

Mirror of Apache James Project
Apache License 2.0
70 stars 63 forks source link

JAMES-3995 Optimize Email/get method #5066

Closed Arsnael closed 6 months ago

Arsnael commented 7 months ago

For Email/get, we seem to buffer body binary parts using Mime4J to be able to recalculate the size of the part.

This causes James to consume a very high amount of memory, which can cause performance issues if there is too many of those.

We should try to find a way to avoid buffering the binary parts in order to save memory, and boost performance for Email/get JMAP method.

JIRA ticket: https://issues.apache.org/jira/browse/JAMES-3995

Arsnael commented 7 months ago

PR: https://github.com/apache/james-project/pull/2005

Arsnael commented 7 months ago

Other PR that serves email/get optimization as well: https://github.com/apache/james-project/pull/2024