Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
master, 0.8.2
-
None
Description
DecoderUtil currently uses the following regex pattern for rfc2047-encoded words:
"(.*?)=\\?(.+?)\\?(\\w)\\?(.*?)\\?="
First capturing group (.*?) is a very expensive regular expression causing next pattern node evaluation on every input character. Because of this decoding of 4 KB input (To: field with 40-80 recipients) takes up to 200ms on modern CPUs.
At the same time, this capturing group used only to store separator text between encoded words. Proposed patch reuses existing tailIndex for separator text extraction and same input decoding now takes only 1-2ms.
Attachments
Attachments
Issue Links
- links to