-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Skip performing content negotiation twice #37637
Labels
Milestone
Comments
👌 |
@franz1981 do you have some sample code that I can use to reproduce this and see its effect in a flamegraph? |
/cc @FroMage (resteasy-reactive), @stuartwdouglas (resteasy-reactive) |
I am trying a change now |
geoand
added a commit
to geoand/quarkus
that referenced
this issue
Dec 11, 2023
These checks have potentially already been performed in ClassRoutingHandler Closes: quarkusio#37637
geoand
added a commit
to geoand/quarkus
that referenced
this issue
Dec 11, 2023
These checks have potentially already been performed in ClassRoutingHandler Closes: quarkusio#37637
#37646 should do the trick |
@geoand I think that's fine, buddy, thanks for looking into it: I'll answer in the PR than |
geoand
added a commit
to geoand/quarkus
that referenced
this issue
Dec 11, 2023
These checks have potentially already been performed in ClassRoutingHandler Closes: quarkusio#37637
geoand
added a commit
to geoand/quarkus
that referenced
this issue
Dec 11, 2023
These checks have potentially already been performed in ClassRoutingHandler Closes: quarkusio#37637
geoand
added a commit
that referenced
this issue
Dec 11, 2023
Remove unnecessary content type checks
franz1981
pushed a commit
to franz1981/quarkus
that referenced
this issue
Dec 12, 2023
These checks have potentially already been performed in ClassRoutingHandler Closes: quarkusio#37637
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
quarkus/independent-projects/resteasy-reactive/server/runtime/src/main/java/org/jboss/resteasy/reactive/server/handlers/ClassRoutingHandler.java
Line 131 in af6d3d7
And
quarkus/independent-projects/resteasy-reactive/server/runtime/src/main/java/org/jboss/resteasy/reactive/server/handlers/FixedProducesHandler.java
Line 47 in af6d3d7
Both seems to verify that Accept and (some) mediaType matches, but the former just to send back a proper response (if unmatched), while the other to find the appropriate writer.
Implementation ideas
Probably would be better to merge them in one pass (on class routing) and just save somewhere the matched one, to allow the subsequent to pick it as a starting point to make faster verifying if the writer is fine.
Moreover, a first pass in the matching logic can be to find for wildcard types on accept, to skip any subsequent op.
The text was updated successfully, but these errors were encountered: