Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jersey-dev] [External] : Performance dip from Jersey 1 to Jersey 2

Thanks Jürgen for replying to an otherwise quiet community now :)
And sorry for the hasty query last time around. Let me explain how my
service looks like and my findings so far.
I have a simple GET service which returns a JSON response (I am now
using GET to narrow down the scope of troubleshooting):

@GET
@Produces({ "application/json" })
@io.swagger.annotations.ApiOperation(value = "", notes = "Returns all
users from the system.", response = List.class, responseContainer =
"List", tags={ })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "user
response", response = User.class, responseContainer = "List"),

@io.swagger.annotations.ApiResponse(code = 200, message = "unexpected
error", response = Error.class) })
public Response getUsers(@Context SecurityContext securityContext )
throws NotFoundException {
return allUsers(securityContext );
}

My web.xml looks like this:

<servlet>
<servlet-name>jersey</servlet-name>
<servlet-class>org.glassfish.jersey.servlet.ServletContainer</servlet-class>
<init-param>
<param-name>jersey.config.server.provider.classnames</param-name>
<param-value>
com.e.s.api.UsersApi,
com.e.s.api.JacksonJsonProvider
</param-value>
</init-param>
<init-param>
<param-name>jersey.config.server.wadl.disableWadl</param-name>
<param-value>true</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
<async-supported>true</async-supported>
</servlet>

My finding so far from profiling this API is that it's taking almost
200-800ms between the filter and my resource method. While Jersey1
takes around 50-100ms.
I doubt whether Jersey is taking this much time in resolving the
Resource and sub-resource. Looking for leads on possible reasons for
this?
My next step is to use the RequestEventListener in further narrowing
down the step that takes this much time.
Any leads are much appreciated

Thanks & Regards,
Nagesh Soni

On Fri, 11 Mar 2022 at 13:19, Jürgen Albert <j.albert@xxxxxxxxxxxxxxxxxx> wrote:
>
> Hi Nagesh,
>
> I'm not part of the jersey developer team and I'm just subscribed to this list to listen in. As contributor and maintainer of other OSS projects I have to comment though.
>
> You appear to be a software developer yourself. So please read what you have send to the list so far and ask yourself what answers you could give, if somebody send something like this to you about your product/project. Alternatively show it to a friend and ask him.
>
> Till now you wrote a mail to a VW car workshop and said that you switched from and 1980s beetle to a 2021 Version and it appears to be slower. Your answer to a question for details was: I drive, refuel with regular and shifting takes me longer...
>
> If you want free help from the community please give them something to work with.
>
> Respectfully,
>
> Jürgen.
>
> Am 11/03/2022 um 01:37 schrieb Nagesh Soni:
>
> We accept JSON and send JSON in response and we see that the request takes some seconds between filter and application.
> 3rd party lib for JSON : Jackson
>
> On Thu, 10 Mar 2022, 7:57 pm Jan Supol, <jan.supol@xxxxxxxxxx> wrote:
>>
>> Hi, can you please be more specific in what you do in your app to see the throughput dip? Is it just a sequence of HTTP requests, is it SSE communication, or something else? Do you use some 3rd party lib such as for json?
>> -- Jan
>> ________________________________
>> From: jersey-dev <jersey-dev-bounces@xxxxxxxxxxx> on behalf of Nagesh Soni <nageshsoni393@xxxxxxxxx>
>> Sent: Thursday, March 10, 2022 10:51 AM
>> To: jersey-dev@xxxxxxxxxxx <jersey-dev@xxxxxxxxxxx>
>> Subject: [External] : [jersey-dev] Performance dip from Jersey 1 to Jersey 2
>>
>> Hi Team,
>>
>> I am facing a throughput dip switching from Jersey1 to Jersey2 while
>> using jetty server. Is there any known reason why this dip can occur?
>>
>> Jersey1 version: 1.19.4
>> Jersey2 version: 2.29
>> Jetty version: 9.4.43.v20210629
>>
>> Thanks & Regards,
>> Nagesh Soni
>> _______________________________________________
>> jersey-dev mailing list
>> jersey-dev@xxxxxxxxxxx
>> To unsubscribe from this list, visit https://urldefense.com/v3/__https://www.eclipse.org/mailman/listinfo/jersey-dev__;!!ACWV5N9M2RV99hQ!dN1cq9aZtpaMPgR-nycyTL2DqDoUVbFVPylDbJ3m4vg-A9Jw_9i5OhRGgxO8ZX0P$
>> _______________________________________________
>> jersey-dev mailing list
>> jersey-dev@xxxxxxxxxxx
>> To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/jersey-dev
>
>
> _______________________________________________
> jersey-dev mailing list
> jersey-dev@xxxxxxxxxxx
> To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/jersey-dev
>
> --
> Jürgen Albert
> CEO
> Chair Eclipse OSGi Working Group Steering Committee
>
>
> Data In Motion Consulting GmbH
>
> Kahlaische Str. 4
> 07745 Jena
>
> Mobil:  +49 157-72521634
> E-Mail: j.albert@xxxxxxxxxxxxxxx
> Web: www.datainmotion.de
>
> XING:   https://www.xing.com/profile/Juergen_Albert5
> LinkedIn: https://www.linkedin.com/in/juergen-albert-6a1796/
>
> Rechtliches
>
> Jena HBR 513025
>
> _______________________________________________
> jersey-dev mailing list
> jersey-dev@xxxxxxxxxxx
> To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/jersey-dev


Back to the top