Our app is also Spring-based. We did some optimisation about a year ago. Don't really remember how quickly we got our app to start. I think it was in the ballpark of the 13s result you got. 50s is too long.
Here's what we've done: * combine our own classes into one JAR * reduce dependencies as much as possible (exclude unnecessary JPA/JDO dependencies if you're not using them) * turn off Spring autoscan (we list Controllers explicitly, but we do use annotations inside the Controllers) * use static instead of dynamic JSP includes when possible * turn on JSP precompilation * there may be a few other things I'm forgetting On Apr 8, 6:16 pm, Tomas <[email protected]> wrote: > Hi guys, > > I've decided to convert my servlet/jdo based app engine app to spring mvc > (the current app is starting to limit me on doing quick > changes/improvements in the code and as I have quite good experience with > spring on standard non cloud platforms I've decided to give it a go). > > So I've put together project including: > > - Spring + Spring MVC + Apache Velocity > - ehcache + spring-annotations for ehcache + own decorators/interceptors > for appengine memcached > - objectify > - some other util classes ie jsoup, commons (util, baens, logging, codec), > gdata > > The lib directory contains ~42MB of jars (including appengine libraries > which makes ~25MB) > > After deploy, the app takes 50+ seconds to start (sometime the first > request get killed after 60 seconds and another app is started) - I've read > some articles about speeding up the spring on gae and decided to do another > little test. I've created testing app containing only spring + spring mvc > with one controller (no other beans, but had to keep the annotation scan > enabled for mvc mapping - but disabled the component scan). The controller > simply forwards to JSP file with text. Deployed and the page got displayed > after 13 seconds. > > I knew the Spring with all proxies and scanning is not optimal for GAE but > I wasn't expecting this at all - it seems like the app have issues with > simple loading the libraries as I can see how the memory of instance is > growing by 1 MB per second. I've tried to: > > 1) merge jars into 3-4 bigger ones > 2) disable annotations (just for the test as with new spring mvc its quite > hard to do some better mapping only in xml) > 3) lazy load some spring beans > > And I can save like 5-10 secods from those 50+ seconds of my startup - is > it really so bad for everyone or is there some magic setting? > > Whats your normal startup time of your spring based app? -- You received this message because you are subscribed to the Google Groups "Google App Engine" 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?hl=en.
