-
Notifications
You must be signed in to change notification settings - Fork 191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ISSUE-292 Prevent SPI calls at runtime #293
Conversation
What's the issue this addresses? |
Ah I see it here: #292 |
java-client/src/main/java/org/opensearch/client/json/jackson/JsonValueParser.java
Outdated
Show resolved
Hide resolved
@chibenwa please sign with DCO (commit with |
Can we please add a unit test for this, too? |
Can you describe which test you want? I expect existing test suite to cover functionnal behaviour. And testing "preventing spi calls" might require additionnal levels of indirection which i would consider harmful. Maybe a jmh bench? |
I think it makes sense that this would go testless. On the other hand, it
would be awesome if you could open an issue suggesting an ongoing approach
to performance, to perhaps detect other low hanging fruit.
…On Tue, Dec 20, 2022 at 9:01 AM Benoit TELLIER ***@***.***> wrote:
Can you describe which test you want?
I expect existing test suite to cover functionnal behaviour. And testing
"preventing spi calls" might require additionnal levels of indirection
which i would consider harmful.
Maybe a jmh bench?
—
Reply to this email directly, view it on GitHub
<#293 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA5PRLRL7BZBCP3UAB4W7SLWOG327ANCNFSM6AAAAAAS7MFNM4>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Next week i'll propose a JMH bench for this changeset. Regarding "detection of low hanging fruits" I use asyncprofiler on my workloads (memory & cpu). Can't recall other massive painpoints but I will get a second look, and share flame graphs here too. Happy new year, Regards, Benoit |
Here is the flame graph I diagnosed this issue from. Taken with https://github.com/jvm-profiling-tools/async-profiler :
(From within my applicative container) Then searching
Observations for the driver event loop:
|
JMH output backing this changeBefore
After
Conclusionx50 fastening of the JSOn parsing by getting rid of the SPI lookups, not event taking into account blocking operations... Huge win! Code of the benchmark
The bench was applied before/after the backport of this PR on top of Apache James CF apache/james-project@d5af3a5 (Note this backport is uggly and I would like to drop it as fast as possible!) |
It is known that |
I do not see how this affects this benchmark |
Apologies, your benchmark checks the impact of changing the |
Would you be up for adding a change to the changelog? |
Signed-off-by: Benoit Tellier <btellier@linagora.com>
The backport to
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-2.x 2.x
# Navigate to the new working tree
cd .worktrees/backport-2.x
# Create a new branch
git switch --create backport/backport-293-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 a8df7e7c26ccc644811539c4fea57d97f1031aaa
# Push it to GitHub
git push --set-upstream origin backport/backport-293-to-2.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-2.x Then, create a pull request where the |
Closes #292