You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Esteban Ignacio Masoero <em...@getsense.com.ar> on 2010/04/19 23:19:02 UTC

What can I do to speed up wicket initialization?

Hi there:

I know it's not THAT slow, and every presentation framework has it's
"loading time", but in my case this is affecting me in a much worse way and
there's no other solution for now.
Can any wicket expert tell me what can I do (anything: pre-compile
something, do something lazily, avoid something, etc) to speed up wicket
initialization? In GAE environment it takes up to 10 seconds from the moment
I see the log entry "Started Wicket in deployment mode".

I provide more details about my problem below.

Thanks,

Esteban

My Problem:
I'm using GAE and currently there's a problem that when your app gets few
traffic, it gets "cycled out" (kicked out of the jvm) after a few minutes of
not being accessed by anyone. So when your app (as mine) gets few visits,
almost every visit takes up to 10 seconds because wicket initializes every
time.  There has been a number of solutions proposed:
- Run a cron job to visit the app so it's kept "warm". This is discouraged
from Google guys, as it would take all of us to the Tragedy of the Commons (
http://groups.google.com/group/google-appengine/browse_thread/thread/22692895421825cb/)
- Pay to reserve a JVM (not available yet,
http://code.google.com/p/googleappengine/issues/detail?id=2456 )
- Do anything you can to optimize your initialization code (here I am!)

Re: What can I do to speed up wicket initialization?

Posted by Jeremy Thomerson <je...@wickettraining.com>.
On Mon, Apr 19, 2010 at 5:32 PM, Zilvinas Vilutis <ci...@gmail.com> wrote:

> Spring / hibernate usually loads *before* seeing the message "Started
> Wicket in deployment mode".
>

Yes - this is what takes a long time - Spring / Hibernate.  The "Started
Wicket in deployment mode" comes from when Wicket finishes loading, but
Wicket can not start loading until the other stuff is finished.

Although i,n my project ( wicket / spring / hibernate ) it takes less
> than a second to finish the app loading after this message has
> appeared.
>

Sure, because it's nearly the last thing that happens.


> It might be eh-cache, which usually takes a few secods to load too.
>

Yes, this is what I'm getting at - there are many things that load before
Wicket.  You can't just post to the Wicket list and say "how do I speed up
Wicket" when you have done absolutely no profiling.  You need to put
together numbers to see where your bottlenecks are before you can fix them.

Best regards,

--
Jeremy Thomerson
http://www.wickettraining.com

Re: What can I do to speed up wicket initialization?

Posted by Zilvinas Vilutis <ci...@gmail.com>.
Spring / hibernate usually loads *before* seeing the message "Started
Wicket in deployment mode".

Although i,n my project ( wicket / spring / hibernate ) it takes less
than a second to finish the app loading after this message has
appeared.

It might be eh-cache, which usually takes a few secods to load too.



Žilvinas Vilutis

Mobile:   (+370) 652 38353
E-mail:   cikasfm@gmail.com



On Mon, Apr 19, 2010 at 2:54 PM, Jeremy Thomerson
<je...@wickettraining.com> wrote:
> This is typically not Wicket initialization.  The quickstart starts up in
> less than two seconds.  You need to look at your domain / service / data
> layers.  It's typically Spring / Hibernate loading / initializing that takes
> a long time (I've seen apps that take many *minutes* to start up).
>
> --
> Jeremy Thomerson
> http://www.wickettraining.com
>
>
>
> On Mon, Apr 19, 2010 at 4:19 PM, Esteban Ignacio Masoero <
> emasoero@getsense.com.ar> wrote:
>
>> Hi there:
>>
>> I know it's not THAT slow, and every presentation framework has it's
>> "loading time", but in my case this is affecting me in a much worse way and
>> there's no other solution for now.
>> Can any wicket expert tell me what can I do (anything: pre-compile
>> something, do something lazily, avoid something, etc) to speed up wicket
>> initialization? In GAE environment it takes up to 10 seconds from the
>> moment
>> I see the log entry "Started Wicket in deployment mode".
>>
>> I provide more details about my problem below.
>>
>> Thanks,
>>
>> Esteban
>>
>> My Problem:
>> I'm using GAE and currently there's a problem that when your app gets few
>> traffic, it gets "cycled out" (kicked out of the jvm) after a few minutes
>> of
>> not being accessed by anyone. So when your app (as mine) gets few visits,
>> almost every visit takes up to 10 seconds because wicket initializes every
>> time.  There has been a number of solutions proposed:
>> - Run a cron job to visit the app so it's kept "warm". This is discouraged
>> from Google guys, as it would take all of us to the Tragedy of the Commons
>> (
>>
>> http://groups.google.com/group/google-appengine/browse_thread/thread/22692895421825cb/
>> )
>> - Pay to reserve a JVM (not available yet,
>> http://code.google.com/p/googleappengine/issues/detail?id=2456 )
>> - Do anything you can to optimize your initialization code (here I am!)
>>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: What can I do to speed up wicket initialization?

Posted by Jeremy Thomerson <je...@wickettraining.com>.
This is typically not Wicket initialization.  The quickstart starts up in
less than two seconds.  You need to look at your domain / service / data
layers.  It's typically Spring / Hibernate loading / initializing that takes
a long time (I've seen apps that take many *minutes* to start up).

--
Jeremy Thomerson
http://www.wickettraining.com



On Mon, Apr 19, 2010 at 4:19 PM, Esteban Ignacio Masoero <
emasoero@getsense.com.ar> wrote:

> Hi there:
>
> I know it's not THAT slow, and every presentation framework has it's
> "loading time", but in my case this is affecting me in a much worse way and
> there's no other solution for now.
> Can any wicket expert tell me what can I do (anything: pre-compile
> something, do something lazily, avoid something, etc) to speed up wicket
> initialization? In GAE environment it takes up to 10 seconds from the
> moment
> I see the log entry "Started Wicket in deployment mode".
>
> I provide more details about my problem below.
>
> Thanks,
>
> Esteban
>
> My Problem:
> I'm using GAE and currently there's a problem that when your app gets few
> traffic, it gets "cycled out" (kicked out of the jvm) after a few minutes
> of
> not being accessed by anyone. So when your app (as mine) gets few visits,
> almost every visit takes up to 10 seconds because wicket initializes every
> time.  There has been a number of solutions proposed:
> - Run a cron job to visit the app so it's kept "warm". This is discouraged
> from Google guys, as it would take all of us to the Tragedy of the Commons
> (
>
> http://groups.google.com/group/google-appengine/browse_thread/thread/22692895421825cb/
> )
> - Pay to reserve a JVM (not available yet,
> http://code.google.com/p/googleappengine/issues/detail?id=2456 )
> - Do anything you can to optimize your initialization code (here I am!)
>