2011/3/24 Martin Grigorov <mgrigo...@apache.org> > Hi, > > On Thu, Mar 24, 2011 at 7:17 AM, Attila Király <kiralyattila...@gmail.com > >wrote: > > > 2011/3/24 hok <ivanvasi...@gmail.com> > > > > > > 2. In the Servlet 3.0 specification it's possible to have static > > resources > > > under META-INF/resources and I noticed that wicket has > > > MetaInfStaticResourceReference, which is better for serving static > > > resources. In my case for some components I have css files which are > > loaded > > > like: > > > > > > response.renderCSSReference(new > > PackageResourceReference(getClass(), > > > getClass().getSimpleName() + ".css")); > > > > > > So, it should be better to move all those css files under > > > META-INF/resources. However, this somehow contradicts with the wicket > > > philosophy of having everything in one place and requires maintaining a > > > parallel package folder structure under META-INF/resources. Do you > think > > > it's worth it? > > > > > > > Hi, > > > > In my tests I found that Tomcat 7 serves static files from > > META-INF/resources directory 2-3 times faster than wicket. So if > > performance > > is important I think it is worth it. I am pragmatic about it: maybe it is > > bad to not hold everything in the same directory but this is a feature > that > > fits wicket pretty well (bundling static files in jars) so it would be > > worse > > to not use it. > > > > Attila > > > With the new CachingResourceStreamLocator the serving should be faster now. > See https://issues.apache.org/jira/browse/WICKET-3511. > > > -- > Martin Grigorov > jWeekend > Training, Consulting, Development > http://jWeekend.com <http://jweekend.com/> >
Hi, I made a new test (serving a png and a js) with current trunk and the gap is much smaller now: tomcat is 25% faster on average. Attila