users@jersey.java.net

[Jersey] Re: Reducing boot time for Jersey + Grizzly server

From: Hugo Visser <botteaap_at_gmail.com>
Date: Sat, 2 Apr 2011 10:24:46 +0200

Yes, on appengine it is likewise in that sense: depending on the
traffic a vm gets killed or added so bootstrap time matters. I dug
around yesterday but haven't found anything solid yet, although my
primary suspect is the creation of AbstractResources that use
reflection to get to the annotations etc.

On Fri, Apr 1, 2011 at 7:14 PM, Arnaud Bailly <arnaud.oqube_at_gmail.com> wrote:
> Hi Hugo,
> Interesting indeed. When I removed packages scanning, there was a large
> improvement but I am still quite surprised by the boot time of the
> Grizzly+Jersey. As I already said, I did not measure nor profile anything,
> but my human-based feeling is consistent with what you are observing.
> Obviously, this is no big deal when your application is supposed to boot-up
> once in a while, but this is not my use case: Our application goes on and
> off and is part of another larger system.
>
> I will try next week to get some profiling metrics.
>
> Best regards,
> Arnaud
>
> On Fri, Apr 1, 2011 at 6:21 PM, Hugo Visser [via Jersey] <[hidden email]>
> wrote:
>>
>> Hi Arnaud,
>>
>> I was wondering if you are also seeing a speed up in
>> WebApplicationImpl _initiate? I'm currently using GuiceContainer and I
>> am explicitly binding the resources in Guice module. Looking at the
>> code this appears to be the same as passing an Application object.
>>
>> The large delay in my case appears to be the actual init of the
>> WebApplicationImpl which takes about 1,5 seconds for our app, running
>> on appengine. I've been digging through the code trying to find
>> something to optimize, but didn't get anywhere. It would be great if
>> the bootstrapping delay could be reduced. Any hints in that area would
>> be appreciated.
>>
>> Hugo
>>
>> On Fri, Apr 1, 2011 at 2:33 PM, Arnaud Bailly <[hidden email]> wrote:
>> > Hello,
>> >
>> > I was wondering then how it came it took me a bit of time to figure out
>> > this
>> > is the "best practice" with Jersey. An thought it might be better to
>> > advocate it as early as possible in the documentation which, AFAI
>> > remember
>> > is mostly oriented towards automatic discovery. A detailed example of
>> > wiring
>> > an applilcation, with resources and providers, might be helpful to get a
>> > grasp of how best integrate Jersey.
>> >
>> > Best regards,
>> > Arnaud
>> >
>> > --
>> > View this message in context:
>> > http://jersey.576304.n2.nabble.com/Reducing-boot-time-for-Jersey-Grizzly-server-tp6210445p6230789.html
>> > Sent from the Jersey mailing list archive at Nabble.com.
>> >
>>
>>
>> ________________________________
>> If you reply to this email, your message will be added to the discussion
>> below:
>>
>> http://jersey.576304.n2.nabble.com/Reducing-boot-time-for-Jersey-Grizzly-server-tp6210445p6231698.html
>
> ________________________________
> View this message in context: Re: Reducing boot time for Jersey + Grizzly
> server
> Sent from the Jersey mailing list archive at Nabble.com.
>