Remy,
sorry, but I don't see which part of our email exchange you found "very frustrating". As I said, I'm open to suggestions, and if my patch is deemed useless, I'll revert it. No problem.
I've done some measurements on my Ultra 60. TldConfig already calculates the tldScanTime for each context, so that's the number I'm using. Following are the tldScanTime numbers for a sequence of 10 startups with the "standard" contexts:
- w/o optimization (static initializer in TldConfig commented out):
Context name tldScanTime for 10 runs | Average
-------------------------------------------------------------------------------
/manager 417/452/431/438/408/468/434/418/423/450 | 433.90
/admin 1399/1310/1440/1385/1288/1347/1345/1340/1280/1317 |1345.10
/servlets-examples 210/198/206/235/192/182/189/188/166/195 | 196.10
[] 222/222/213/218/222/225/215/204/223/221 | 218.50
/jsp-examples 996/841/854/862/900/855/903/845/856/815 | 872.70
/tomcat-docs 155/176/168/184/175/294/164/185/194/183 | 187.80
Total=3254.10
- With optimization
Context name tldScanTime for 10 runs | Average
-------------------------------------------------------------------------------
/manager 239/225/242/375/230/241/234/228/237/319 | 257.00
/admin 1225/1192/1242/1171/1320/1251/1248/1270/1253/1219 |1239.10
/servlets-examples 74/69/165/79/92/71/106/96/95/123 | 97.00
[] 129/109/136/186/241/194/111/103/96/142 | 144.70
/jsp-examples 728/736/757/843/812/796/782/753/820/813 | 784.00
/tomcat-docs 77/60/127/191/102/101/61/96/88/85 | 98.80
Total=2620.60
I'm not going to comment on how slow an Ultra 60 is ;-)
You did disable caching for those tests, right ? If you didn't, those results are weird.
My comments are:
- Real world apps are not really helped by your optimizations (the admin webapp)
- On my Pentium M, the difference is probably not measurable
- This is .8s of the first startup, right ?
This may not be significant, but if you increase the number of contexts and have additional JARs on your classpath of which you know they don't contain any TLDs, we're talking seconds, not ms.
And overall, likely less than 5% of the overall startup time, assuming real webapps. And, again, that's only for the first startup.
Look, there's still likely useful optimizations to be done in Tomcat 5. For example, you can see the buffering which I added, based on the analysis of Steve Appling, and which significantly reduces the I/O activity in many cases. In this example, the benches are identical, but in the real world, it should be a big difference.
However, we should never do useless optimizations, as it always increases complexity.
As I mentioned in my private email to you, it may not always be practical to rely on the list of "noTldJars" configured in catalina.properties if you bundle Tomcat with your own product. That's why I added the setProperty method on CatalinaProperties, in order to be able to override the value in catalina.properties. This allows the list of "noTldJars" to be determined more accurately at runtime. The code that is embedding Tomcat would call CatalinaProperties.setProperty() *before* starting Tomcat.
And is exactly what I wanted to avoid. Again, CatalinaProperties is for configuring the bootstrap, not anything else (otherwise, stuff which belongs to server.xml will end up here, and it will end up being a huge mess).
I leave the judgement up to the community.
I'll have to reiterate my -1.
Remy
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
