We have been seeing the same here, a 5X diff between the dev and prod
servers for booting the app.

We are using Spring and Objectify. No 'business work' is done at init
time.

Reduce classpath scanning to a single pass or none at all. This
scanning is real,y really costly. For instance, do not split your
Spring config in 2, put your mvc/servlet context in the root context.

Use a warmup servlet. That way, the actual time spent at startup won't
include also processing the first request.

Use lazy initialization were possible.

Enable multi-threading in Java apps.

Beware of spring security, which adds a lot to the startup time.

On Aug 5, 8:50 am, David Sowerby <[email protected]> wrote:
> Hi John
>
> I'm afraid I cannot offer any specific suggestions, but I it may be
> worth looking at the Objectify persistence framework, one of its
> primary goals was to reduce start up time.  If nothing else, trawling
> the documentation may give you some valuable clues
>
> On Aug 4, 2:57 am, John <[email protected]> wrote:
>
>
>
> > As our app has grown, the amount of initialization work to do in order to
> > make an instance useful has increased to the point that GAE often terminates
> > requests that start a new instance. We had a warmup servlet, but the work
> > started to commonly exceed the deadline. We're now looking to pare down the
> > warmup, but we're having trouble with tuning since the behavior seems pretty
> > different on the dev server from GAE. On the dev server, the initialization
> > (loading our initial servlets) will complete in the vicinity of 4sec while
> > GAE instance startup is often more than 20sec. We often see inexplicable
> > gaps in our logging of 15sec or more (seemingly hung up), but it doesn't
> > seem repeatable.
>
> > Our focus to date has been to optimize the JDO/Datanucleus startup, but we
> > believe that a significant contributor might be the number of classes
> > loaded. Is it accurate to conclude that class loading carries a larger
> > overhead on GAE than other environments? Are there any tools that will help
> > us understand the processing during this startup? The Appstats tool shows
> > long delays, but we don't know what is taking time besides the RPCs.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to