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
Performance improvements #2479
Merged
Merged
Performance improvements #2479
Conversation
This file contains 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
- Avoid unnecessary use of URI.create - rather do more lazily - Multivalued maps will 99% of the time have 1 or maybe 2 entries for a key so don't allocate memory for 10 - Avoid unnecessary matcher creation when decoding when a string does not contain % in it - which is the more likely case for URI's to Rest resources These changes increase throughput by about 2% on a simple Rest service.
@bcluap , thanks for your contribution. Since this is your first one, please note that we require that all contributions are made under the terms of the ASL 2.0 License: http://www.apache.org/licenses/LICENSE-2.0 |
Yes I agree
…On Mon, 27 Jul 2020, 23:39 Alessio Soldano, ***@***.***> wrote:
@bcluap <https://github.com/bcluap> , thanks for your contribution. Since
this is your first one, please note that we require that all contributions
are made under the terms of the ASL 2.0 License:
http://www.apache.org/licenses/LICENSE-2.0
Do you agree to these terms?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2479 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AGMB23NULDN7ZOEVI5BMORLR5XXZVANCNFSM4PI4NZ4Q>
.
|
asoldano
approved these changes
Jul 28, 2020
asoldano
pushed a commit
to asoldano/Resteasy
that referenced
this pull request
Sep 17, 2020
- Avoid unnecessary use of URI.create - rather do more lazily - Multivalued maps will 99% of the time have 1 or maybe 2 entries for a key so don't allocate memory for 10 - Avoid unnecessary matcher creation when decoding when a string does not contain % in it - which is the more likely case for URI's to Rest resources These changes increase throughput by about 2% on a simple Rest service. Co-authored-by: Paul Carter-Brown <paul.carter-brown@jini.guru>
ronsigal
added a commit
that referenced
this pull request
Sep 17, 2020
* [RESTEASY-2625]:Fix @produces(text/event-stream * [RESTEASY-2610] Upgrade MicroProfile REST Client to 1.4.1 * [RESTEASY-2595] Add getLinks method with a custom class loader * [RESTEASY-2597] add methods and test to support setting * [RESTEASY-2300] allow empty Host header for netty adapters * [RESTEASY-2300] test-cases for empty Host header field * Remove deps from the BOM that don't exist in the current version * [RESTEASY-2633] Encode code points that span multiple characters (#2456) Fixes RESTEASY-2633 * [RESTEASY-2637] Fix issue with Spring Web parameters encoding (#2453) Fixes: quarkusio/quarkus#10133 * Upgrade to wildfly 20.0.0.Final * Disable wiremock banner * [RESTEASY-2639] Bump version.log4j from 2.9.1 to 2.13.3 in /resteasy-dependencies-bom (#2460) Bumps `version.log4j` from 2.9.1 to 2.13.3. Updates `log4j-api` from 2.9.1 to 2.13.3 Updates `log4j-core` from 2.9.1 to 2.13.3 Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * [RESTEASY-2634] Fix HttpHeaders.getAcceptableLanguages (#2458) JAX-RS mandates that HttpHeaders.getAcceptableLanguages() returns a single wildcard locale instance if no acceptable languages are defined. * [RESTEASY-2642] Add doPrivs to sys prop checks (#2467) * [RESTEASY-2642] Add doPrivs to sys prop checks Signed-off-by: Andy McCright <j.andrew.mccright@gmail.com> * Review comment: only use doPriv if SecMgr is used Signed-off-by: Andy McCright <j.andrew.mccright@gmail.com> * [RESTEASY-2645] Upgrade Jackson to 2.11.1 * RESTEASY-2648 Upgrade json-patch to 1.13 * [RESTEASY-2648][RESTEASY-2327] Additional minor fix to modules and removal of exclusion * [RESTEASY-2649] Upgrade shrinkwrap to 2.2.7 (#2473) * [RESTEASY-2646]:Fix match cache in RootNode grows infinitely (#2471) * [RESTEASY-2646]:Initial fix * [RESTEASY-2646]:More improvement * [RESTEASY-2646]:Get match catch config from system property * Code cleanup * [RESTEASY-2646]:Without caching match if the ContentType contains parameters * Test for RootNode cache size limit * Fix test Co-authored-by: Rostislav Svoboda <rsvoboda@redhat.com> * Test for RESTEASY-2633 * [RESTEASY-2659] Performance improvements (#2479) - Avoid unnecessary use of URI.create - rather do more lazily - Multivalued maps will 99% of the time have 1 or maybe 2 entries for a key so don't allocate memory for 10 - Avoid unnecessary matcher creation when decoding when a string does not contain % in it - which is the more likely case for URI's to Rest resources These changes increase throughput by about 2% on a simple Rest service. Co-authored-by: Paul Carter-Brown <paul.carter-brown@jini.guru> * RESTEASY-2662 Don't create a context if it does not exist * [RESTEASY-2666] Upgrade httpclient/httpcore * [RESTEASY-2670] Ensure immutability and properly rely on builders * [RESTEASY-2669] Dealt with a few warnings * [RESTEASY-2668] Remove SseEventOutputProvider * [RESTEASY-2667] Removing SerializableProvider * [RESTEASY-2669] Misc cleanup and warning fixes * [RESTEASY-2669] Further warnings' cleanup in core * RESTEASY-2674 Escape sign of quotation to see the value of parameter * [RESTEASY-2661]:MediaTypeMap shared across threads, but cache is not … (#2498) * [RESTEASY-2661]:MediaTypeMap shared across threads, but cache is not thread-safe * Update MediaTypeMap.java Removing comment about volatility. Co-authored-by: Ron Sigal <rsigal@redhat.com> * [RESTEASY-2549] Remove resteasy-validator-provider source dependency on Hibernate Validate. [RESTEASY-2549] Moved NonCDIValidatorFactoryTest to integration-tests-embedded * Do not use ResteasyProviderFactory.getInstance() in SseEventProvider * [RESTEASY-2684] Statically set provider factory on ResteasyClientBuilderImpl (#2504) * [RESTEASY-2684] Statically set provider factory on ResteasyClientBuilderImpl * [RESTEASY-2684] Added unit test. * [RESTEASY-2684] Fix new unit test. Co-authored-by: Ron Sigal <rsigal@redhat.com> * [RESTEASY-2683] NPE in ApacheHttpClient43Test because cache is null in MediaTypeMap (#2501) * [RESTEASY-2592] removed profile forward.compatibility and annotation NotForForwardCompatibility * RESTEASY-2678 - Fix read priority from @priority with @RegisterProvider. * [RESTEASY-2687] Revisit fix in previous commit and remove ResteasyProviderFactory.getInstance() in other locations as well * Deprecated unused classes * [RESTEASY-2592] Restore unintentially disabled testsuites * Update target containers * [RESTEASY-2627] Chain thenCompose properly * [RESTEASY-2689] Fix SseEventOutputImpl wrong CompletionStage composition sequence * RESTEASY-2678 - Fix test. * [RESTEASY-2689]:Add a test case * [RESTEASY-2685] Merge client headers with MP REST Client * Add test to verify behavior * Needed to reset beanManager inside the extension for testing * Build to 4.5.7-SNAPSHOT Co-authored-by: Jim Ma <ema@redhat.com> Co-authored-by: Gytis Trikleris <gytis@redhat.com> Co-authored-by: R Searls <rsearls@redhat.com> Co-authored-by: Ivo Studensky <istudens@redhat.com> Co-authored-by: Alexey Loubyansky <olubyans@redhat.com> Co-authored-by: Stuart Douglas <stuart.w.douglas@gmail.com> Co-authored-by: Georgios Andrianakis <geoand@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Christoph Böhme <christoph@b3e.net> Co-authored-by: Andy McCright <j.andrew.mccright@gmail.com> Co-authored-by: George Gastaldi <gegastaldi@gmail.com> Co-authored-by: Tomaz Cerar <tomaz.cerar@gmail.com> Co-authored-by: Rostislav Svoboda <rsvoboda@redhat.com> Co-authored-by: bcluap <bcluap@gmail.com> Co-authored-by: Paul Carter-Brown <paul.carter-brown@jini.guru> Co-authored-by: Ron Sigal <rsigal@redhat.com> Co-authored-by: Ken Finnigan <ken@kenfinnigan.me> Co-authored-by: rmartinc <rmartinc@redhat.com> Co-authored-by: Roberto Cortez <radcortez@yahoo.com> Co-authored-by: a.koshkin <a.koshkin@tinkoff.ru>
asoldano
pushed a commit
that referenced
this pull request
Sep 18, 2020
- Avoid unnecessary use of URI.create - rather do more lazily - Multivalued maps will 99% of the time have 1 or maybe 2 entries for a key so don't allocate memory for 10 - Avoid unnecessary matcher creation when decoding when a string does not contain % in it - which is the more likely case for URI's to Rest resources These changes increase throughput by about 2% on a simple Rest service. Co-authored-by: Paul Carter-Brown <paul.carter-brown@jini.guru>
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.
These changes increase throughput by about 2% on a simple Rest service and were found doing some hotspot analysis on load tests on Quarkus.