[ 
https://issues.apache.org/jira/browse/MIME4J-318?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17584544#comment-17584544
 ] 

Benoit Tellier commented on MIME4J-318:
---------------------------------------

I also added `james.mime4j.buffer.recycling.enabled=true/false` system property 
to turn easily on/off this behaviour.

> Buffer recycling
> ----------------
>
>                 Key: MIME4J-318
>                 URL: https://issues.apache.org/jira/browse/MIME4J-318
>             Project: James Mime4j
>          Issue Type: Improvement
>          Components: core, dom
>            Reporter: Benoit Tellier
>            Priority: Major
>             Fix For: 0.8.8
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Running MIME4J-317 benchmarks I realized we were alloction heavy with over 3 
> GB/s of heap allocation.
> MIME4J allocates many large buffer on a very regular basis thus undermining 
> performance.
> Looking at what other parsing library does (eg: jackson JSON parsers) buffer 
> recycling is very common.
> With MIME4j it significatly decreases allocation rates by a factor 10, 
> unlocking a 37% speedup in the benchmarks.
> h3. Consideration
> Maybe buffer recycling can be made opt in, enabled via system properties 
> first, and if convincing can be adopted in 0.8.9. Tell me if you want to have 
> a -Dmime4j.buffer.recycling.enabled=true/false system property...



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to