[PERFORMANCE] Cache and reuse Object mappers for writing JMAP responses#440
Merged
chibenwa merged 2 commits intoapache:masterfrom May 24, 2021
Merged
[PERFORMANCE] Cache and reuse Object mappers for writing JMAP responses#440chibenwa merged 2 commits intoapache:masterfrom
chibenwa merged 2 commits intoapache:masterfrom
Conversation
4ceac39 to
2d7b0ad
Compare
Arsnael
reviewed
May 20, 2021
Arsnael
approved these changes
May 20, 2021
Contributor
Author
Looks weird... |
Clients use a close ensemble of properties combination in JMAP responses. This enable reuse of jackson assemblies and achieve significant speedup of JMAP responses serialisation. Note that protections against hash collision are setted up.
078d3c5 to
467f299
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Clients use a close ensemble of properties combination in JMAP responses.
This enable reuse of jackson assemblies and achieve significant speedup
of JMAP responses serialisation.
Before
~20% of James applicative CPU time is spent doing JMAP response serialization. This is because each request needs a dedicated property filter, which is implemented by always initializing a new ObjectMapper, which takes time and is sub-optimal as it is not warm.
Here are the associated gatling run:
After
By caching common serialization patterns we decreased 6 time CPU utilization for JMAP Draft response serialization.
Here are the associated gatling run: