users@jersey.java.net

[Jersey] Re: Slow Resource Method Matching

From: Marek Potociar <marek.potociar_at_oracle.com>
Date: Tue, 16 Sep 2014 16:34:08 +0200

Hi,

do you have a reproducer application that we could test?
Ideally, please open a new performance issue in Jersey JIRA and attach the reproducer Unit test or application there.

Thank you,
Marek

On 16 Sep 2014, at 15:17, Alden Quimby <aldenquimby_at_gmail.com> wrote:

> I've been trying to improve the performance of one of my jersey apis, and when I turn on tracing, I'm seeing slow resource method matching:
>
> GET /computers/apple/9?refurbished_id=47
>
> X-Jersey-Tracing-002:MATCH [1175.91 / 1177.54 ms | 60.83 %] RequestMatching summary
>
> 1.175 seconds to match the resource is a little crazy, especially because the url causing this is really straightforward. My path annotations are as follows:
>
> @Path("/computers")
> class SomeClass
> {
> @Path("/apple/{id}")
> void someMethod(@PathParam("id") id, @QueryParam("refurbished_id") refurbishedId)
> {
> ...
> }
> }
>
> Has anyone run into issues with resource method matching? Any suggestions for improvements I can make here? I am using Jersey 2.11, @ManagedAsync everywhere, and have roughly 50 requests per second coming in.
>
> Thanks for the help!
>