Hi Leonardo, great work, thanks!
Here are the new results: http://img585.imageshack.us/img585/1959/stateless2.png Best regards, Thomas 2012/1/26 Leonardo Uribe <lu4...@gmail.com> > Hi > > I have committed all patches planned to include in the next release > related to performance improvements. > > @Thomas Andraschko : It could be great if you have some time to try the > code and share your findings. You can find 2.1.6-SNAPSHOT or > 2.0.12-SNAPSHOT snapshots here: > > > https://repository.apache.org/content/repositories/snapshots/org/apache/myfaces/core > > regards, > > Leonardo Uribe > > > 2012/1/11 Thomas Andraschko <zoi...@googlemail.com> > >> WOW, great! I'm looking forward for the next version and will rerun my >> tests again! >> >> Add this as subproject to MyFaces (commons or else) would be great and an >> honor! >> ASL v2 is no problem as the initial version was also licensed ASL v2. >> >> 2012/1/10 Leonardo Uribe <lu4...@gmail.com> >> >> > Hi >> > >> > Thanks for your interest about doing these comparisons. >> > >> > 2012/1/10 Thomas Andraschko <zoi...@googlemail.com>: >> > > So, here are finally some results from JMeter for 600 requests. Both >> > > MyFaces and Mojarra runs on Jetty8. >> > > >> > > http://img59.imageshack.us/img59/4720/stateless.jpg >> > > >> > > AFAICS MyFaces performs better on postbacks but Mojarra seems to be >> > faster >> > > for get requests. >> > > >> > >> > Yes, MyFaces has some smart optimizations in that part that avoids >> > process the view before render view (second call to buildView), and >> > there are other improvements inside facelets algorithm that at the end >> > reduce the time required to build a view. >> > >> > > Anybody knows why Mojarra is a lot faster for the first example >> (Simple >> > > page with 2000 items in a h:datatable) under load? >> > > >> > >> > Doing some black box tests with NetBeans Profiler, I notice Mojarra >> > has some optimizations in the renderer part. The bottleneck is caused >> > because MyFaces did many unnecessary calls to HashMap.get() (one per >> > property). This was improved using a "flag" property for common >> > passthrough attributes, just like in the old times when memory was >> > scarce and assembler was the king. That optimization is still >> > incomplete, but I already have it on my laptop (without review), so >> > I'll commit that code in a few days. >> > >> > Another hot spot is our ResponseWriter implementation. It creates a >> > lot of StringBuilder instances, but it is possible to rearrange the >> > code to eliminate them and write directly over the stream, or like >> > trinidad does, reuse the same instance over and over. Again, I already >> > have the code but it will take some days to review and commit. >> > >> > The good news are with these changes and other improvements already >> > done / todo , MyFaces can become even faster and lighter, requiring >> > less memory resources. Maybe with these changes it could be faster >> > than Mojarra in all situations (note I'm speculating here and I don't >> > have the data that prove that (not yet but soon) ). >> > >> > > Also i sent back the the code to rudy for 3 weeks ago but he did not >> > shared >> > > / posted it. Now i completely refactored the code again and added >> > complete >> > > MyFaces compatibility. >> > > Is anyone interested in this extension? >> > > Where could i share it? >> > > I could add it as submodule to primefaces-extensions but it has >> nothing >> > to >> > > do with primefaces... >> > > MyFaces Extension or else would be great :D >> > > >> > >> > Maybe apache extras is a good place (I don't know if the code can be >> > licensed under ASL v2). I think it is a interesting goodie, and maybe >> > a good place could be MyFaces commons. >> > >> > regards, >> > >> > Leonardo Uribe >> > >> > > >> > > 2012/1/5 Thomas Andraschko <zoi...@googlemail.com> >> > > >> > >> Hi Mark, >> > >> >> > >> thanks for sharing your request times! >> > >> >> > >> don't know but it's really that slow^^ >> > >> Currently the test page is embedded in a private project but i will >> > create >> > >> an own test project only for "stateless-jsf". >> > >> I will also do some load tests with JMeter and share the result then. >> > >> >> > >> Hopefully MYFACES-3266 can be done in the next versions, this blows >> up >> > my >> > >> code :) >> > >> >> > >> Best regards, >> > >> Thomas >> > >> >> > >> >> > >> 2011/12/31 Mark Struberg <strub...@yahoo.de> >> > >> >> > >>> MyFaces is faster, but I didn't think that Mojarra is so slow ^^. >> > >>> Our fat pages (~2000 lines in a complex h:dataTable -> more than >> > 300.000 >> > >>> ELResolver invocations) use to take up to 350ms. Small pages render >> in >> > 17ms >> > >>> on our Server with OWB and MyFaces. >> > >>> >> > >>> I once tested the fat pages with Glassfish and didn't came under 5 >> > >>> seconds. But this was quite some time ago when Weld used to be much >> > slower >> > >>> (we now gave them a few hints on performance improvements in the >> > meantme) >> > >>> and the Sun EL impl had some serious performance hogs. >> > >>> >> > >>> >> > >>> Is your test page setup freely available? You might share your >> findings >> > >>> with the Mojarra team. They might be interested to check where they >> > have >> > >>> problematic spots. >> > >>> >> > >>> LieGrue, >> > >>> strub >> > >>> >> > >>> >> > >>> ----- Original Message ----- >> > >>> > From: Thomas Andraschko <zoi...@googlemail.com> >> > >>> > To: MyFaces Discussion <users@myfaces.apache.org> >> > >>> > Cc: >> > >>> > Sent: Saturday, December 31, 2011 4:21 AM >> > >>> > Subject: Re: Weird PlexusContainer object in ViewRoot >> > >>> > >> > >>> > Hi, >> > >>> > >> > >>> > so i just did some final tests and these are the result with >> MyFaces >> > >>> and a >> > >>> > simple test page. >> > >>> > The values are not really accurate, i just tested in on my locale >> > system >> > >>> > with firebug for around 10-15 times. >> > >>> > >> > >>> > AJAX PostBacks (Production): >> > >>> > Before: 32-52ms >> > >>> > After: 23-37ms >> > >>> > >> > >>> > PostBack (Production): >> > >>> > Before: 27ms >> > >>> > After: 12ms >> > >>> > >> > >>> > The same page with Mojarra: >> > >>> > >> > >>> > AJAX PostBacks (Production): >> > >>> > Before: 148-196ms >> > >>> > After: 26-50ms >> > >>> > >> > >>> > PostBack (Production): >> > >>> > Before: 140-170ms >> > >>> > After: 15-27ms >> > >>> > >> > >>> > Also if the values are not really accurate, is MyFaces really that >> > much >> > >>> > faster? >> > >>> > >> > >>> > You said that you use a simliar plugin for stateless views. >> > >>> > How does your plugin work? Some details would be great :) >> > >>> > >> > >>> > Best regards >> > >>> > Thomas >> > >>> > >> > >>> > 2011/12/30 Thomas Andraschko <zoi...@googlemail.com> >> > >>> > >> > >>> >> Hi, >> > >>> >> >> > >>> >> yep, thanks! >> > >>> >> I completly redeveloped it (i also contributed the new code >> back) >> > and >> > >>> i >> > >>> >> just test it but the improvement is similar - it's much faster! >> > >>> >> I can post the detail later :) >> > >>> >> >> > >>> >> >> > >>> >> >> > >>> >> 2011/12/30 Martin Koci <martin.kocicak.k...@gmail.com> >> > >>> >> >> > >>> >>> Hi, >> > >>> >>> >> > >>> >>> do you mean non-static logger in myfaces UIViewRoot ? That is >> > >>> probably >> > >>> >>> problem [1] - I must solve it finally. >> > >>> >>> >> > >>> >>> I checked quickly statelessjsf - we use similar solution in >> some >> > jsf >> > >>> >>> project - completely stateless views. >> > >>> >>> >> > >>> >>> Which improvement do you see with myfaces + statelessjsf? The >> blog >> > >>> [2] >> > >>> >>> shows at the first picture time 98ms vs. 7ms : 90% improvement: >> > did >> > >>> you >> > >>> >>> get similar results with myfaces? >> > >>> >>> >> > >>> >>> Regards, >> > >>> >>> >> > >>> >>> Kočičák >> > >>> >>> >> > >>> >>> [1] https://issues.apache.org/jira/browse/MYFACES-3266 >> > >>> >>> [2] >> > >>> >>> >> > >>> >>> >> > >>> > >> > >>> >> > >> http://industrieit.com/blog/2011/11/stateless-jsf-high-performance-zero-per-request-memory-overhead/ >> > >>> >>> >> > >>> >>> Thomas Andraschko píše v Pá 30. 12. 2011 v 12:43 +0100: >> > >>> >>> > Hi, >> > >>> >>> > >> > >>> >>> > thanks for you answer :) >> > >>> >>> > Jap, i deploy it with jetty:run. >> > >>> >>> > I already found the issue, somehow this objects are stored in >> > the >> > >>> >>> Logger. >> > >>> >>> > I changed the code that the logger will be removed before >> > cloning >> > >>> > the >> > >>> >>> > ViewRoot. >> > >>> >>> > Now it also works with MyFaces :) >> > >>> >>> > >> > >>> >>> > Thomas >> > >>> >>> > >> > >>> >>> > 2011/12/30 Martin Koci <martin.kocicak.k...@gmail.com> >> > >>> >>> > >> > >>> >>> > > Hi, >> > >>> >>> > > >> > >>> >>> > > Plexus container is a IoC container used by Maven, so this >> > >>> > must be >> > >>> >>> > > bug/feature in maven jetty plugin in combination with >> > >>> > statelessjsf. Do >> > >>> >>> > > you deploy it with mvn jetty:run? >> > >>> >>> > > >> > >>> >>> > > Regards, >> > >>> >>> > > >> > >>> >>> > > Kočičák >> > >>> >>> > > >> > >>> >>> > > Thomas Andraschko píše v Út 27. 12. 2011 v 15:00 +0100: >> > >>> >>> > > > Hi, >> > >>> >>> > > > >> > >>> >>> > > > i'm trying to use the statelessjsf addon (It's a >> > >>> > addon developed by >> > >>> >>> > > > industrieit from rudy but the link is currently offline) >> > >>> > for my >> > >>> >>> > > > application. In a basic sample application it works with >> > >>> > myfaces >> > >>> >>> (with >> > >>> >>> > > some >> > >>> >>> > > > modification) and mojarra. >> > >>> >>> > > > Somehow in my real project, i get an exception when the >> > >>> > addon is >> > >>> >>> trying >> > >>> >>> > > to >> > >>> >>> > > > clone the viewroot: >> > >>> >>> > > > >> > >>> >>> > > > java.lang.IllegalArgumentException: Can not set >> > >>> >>> > > > org.codehaus.plexus.PlexusContainer field >> > >>> >>> > > > >> > >>> >>> >> > org.codehaus.plexus.archiver.manager.DefaultArchiverManager.container >> > >>> > to >> > >>> >>> > > > >> > >>> > org.codehaus.plexus.archiver.manager.DefaultArchiverManager >> > >>> >>> > > > at >> > >>> >>> > > > >> > >>> >>> > > >> > >>> >>> >> > >>> > >> > >>> >> > >> sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:146) >> > >>> >>> > > > at >> > >>> >>> > > > >> > >>> >>> > > >> > >>> >>> >> > >>> > >> > >>> >> > >> sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:150) >> > >>> >>> > > > at >> > >>> >>> > > > >> > >>> >>> > > >> > >>> >>> >> > >>> > >> > >>> >> > >> sun.reflect.UnsafeFieldAccessorImpl.ensureObj(UnsafeFieldAccessorImpl.java:37) >> > >>> >>> > > > at >> > >>> >>> > > > >> > >>> >>> > > >> > >>> >>> >> > >>> > >> > >>> >> > >> sun.reflect.UnsafeObjectFieldAccessorImpl.set(UnsafeObjectFieldAccessorImpl.java:57) >> > >>> >>> > > > >> > >>> >>> > > > This does only occur if i run the application within >> > >>> > maven and >> > >>> >>> jetty. On >> > >>> >>> > > > Tomcat, no exception occurs. >> > >>> >>> > > > Where does this Plexus stuff come from? Why is it in the >> > >>> > view root? >> > >>> >>> > > > >> > >>> >>> > > > Thanks and best regards >> > >>> >>> > > > Thomas >> > >>> >>> > > >> > >>> >>> > > >> > >>> >>> > > >> > >>> >>> >> > >>> >>> >> > >>> >>> >> > >>> >> >> > >>> > >> > >>> >> > >> >> > >> >> > >> > >