Description
SimpleDateFormat is instanciated for each invocation of DateTimeFieldLenientImpl::parse because SimpleDateFormat is not thread safe.
Using DateTimeFormatter would allow us to initialize it once at class-loading time.
Furthermore we should order the time formats so that the most frequents show up first, limiting the total count of parsing passes.
A simple flame graph study showed date parsing represents 20% of the CPU time when computing a MessageFastView projection, almost comparable to the full header parsing... I would like to lower that CPU time!
Reopen of https://issues.apache.org/jira/browse/JAMES-3584 on the right bug tracker.