Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable TLD scanning at appengine initialization

This thread is similar to: Disable taglib scanning in google app engine (Jetty)

The author of that thread accepted a wrong answer.

We were trying to reduce the appengine startup time of my instances I've come accross the taglib TLD classpath scanning.

My application has 50mb of jars. The scanning of the tld takes 20% of the startup time:

enter image description here

(Image from Yourkit capture of the startup time). You can also set logger.properties level to ALL and you will see the classpath scanning issue going on.

Is there a way to disable that on appengine? God forbid us to have anything to do with taglibs, JSP, or anything like that! We have a very slick velocity + spring-mvc container.

Again, the issue is very clear: appengine doesn't respect "org.mortbay.jetty.webapp.NoTLDJarPattern" configuration in web.xml

This thing is killing our service! Our boot time is going over 60 seconds and we need to do anything to reduce that.

like image 391
Rafael Sanches Avatar asked Jul 12 '13 09:07

Rafael Sanches


1 Answers

Posting my comment from above as answer:

Rename your JARs to match the NoTLDJarPattern used by AppEngine's webdefault.xml.

It's not pretty, but naming all your JARs e.g. jetty-(...).jar should prevent them from being scanned for TLDs.

Alternatively, repackage all JARs into one big JAR and just give that a name covered by AppEngine's NoTLDJarPattern.

like image 136
Philipp Reichart Avatar answered Oct 23 '22 18:10

Philipp Reichart