Hi Lords and Ladies!

I'm currently wrangling with a doubled boot time on tomcat7.0.29 in comparison 
to 7.0.28 (12 webapps in my tc: 7.0.28 < 45s, 7.0.29 > 90s).

I'm aware that 7.0.29 now does the scanning for ServletContainerInitializer 
even if version=2.5 is specified. But there shall no class scanning be 
performed if metadata-complete="true" is set, right? The problem is that 
@HandlesTypes forces scanning. And regardless if you only scanning or the types 
registered via @HandlesTypes or searching for all - the startup time is almost 
the same. This is because the most expensive part is the file and zip 
handling...

So even if the webapp is metadata-complete, it still performs all the class 
scanning. 
You can prove this by simply adding Apache MyFaces to a sample webapp. Any 
other sample which utilizes a ServletContainerInitializer and has @HandlesTypes 
will also do the job. 

In my case it's even more fatal: I have the FacesServlet configured via 
web.xml, so the whole MyFaces ServletContextInitializer is not used at all...

Any ideas how we can ease the pain quickly?

I know the Servlet-EG 'clarified' that only recently, but being an EG member 
myself I know exactly that this can be reverted if it only got 'recently 
clarified'. Nothing is set in stone until a final MR spec with an absolute 
binding wording got released. Mark, others, what about explaining the impact to 
the EG again and maybe they change their mind?

For the long run you might be interested in commons-classscan we do over at 
commons atm. The idea is to have all sorts of ASF projects (tomcat, 
OpenWebBeans, OpenEJB, MyFaces, BVal, OpenJPA, ...) register their needs 
upfront and do the scanning only once.
But it will take a bit until we have something to show off I fear as most of us 
are under heavy load in other ASF projects as well.

LieGrue,
strub


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to