Re: JSF Performance Problems
You may want to look at the wiki for this one. http://wiki.apache.org/myfaces/Performance Dennis Byrne >-Original Message- >From: jfaronson [mailto:[EMAIL PROTECTED] >Sent: Saturday, July 8, 2006 08:11 PM >To: users@myfaces.apache.org >Subject: JSF Performance Problems > > >I grabbed the attachments from the original performance bug >https://javaserverfaces.dev.java.net/issues/show_bug.cgi?id=3 and ran some >JMeter tests against the "JSP only" and the JSF versions. > >The pages are really simple, the JSP version outputs a page which is >visually identical to the JSF page. The table in question had 10 columns and >50 - 200 rows. Not a huge amount of data. I used MyFaces 1.1.3 as the JSF >implementation and ran the test in JBoss 4.0.4 GA running on JDK 1.4.2. > >Here's the results: > > > > Table Rows Average [ms] Median [ms] Hits / Min Samples >JSF Testcase50 36301300 5007 >JSP Testcase50 14104030 5001 >JSF Testcase100 56601050 5001 >JSP Testcase100 21202700 5001 >JSF Testcase200 100 100 590 5001 >JSP Testcase200 26302170 5001 > > > >This data confirms the discussion in the sun forum. The JSF version started >out nearly three times slower than the JSP page. The relative performance of >the JSF version degraded to nearly four times slower as table rows were >added. > >So if you are thinking about adopting JSF you should be aware of the >performance hit and make sure that you can architect around the problem or >get the performance benchmarks adjusted. Perceived performance is important >in real life projects so it's more than a theoretical problem. > >I'd also like to know if anybody has ideas or code samples that make JSF >perform better? >-- >View this message in context: >http://www.nabble.com/JSF-Performance-Problems-tf1912565.html#a5236070 >Sent from the MyFaces - Users forum at Nabble.com. >
Re: JSF Performance Problems
Your right - if the project will involve showing a 200 row table to users ten times a second. Any medium to small sized website should first consider JSF's ability to reduce bugs and development time, rather than worry about pages showing 50ms slower. If users are hitting your website fast, count on your backend portion (i.e. SQL queries) being the area that needs to be addressed first. From: jfaronson To: users@myfaces.apache.org Sent: Saturday, July 08, 2006 5:11 PM Subject: JSF Performance Problems I grabbed the attachments from the original performance bug https://javaserverfaces.dev.java.net/issues/show_bug.cgi?id=3 and ran some JMeter tests against the "JSP only" and the JSF versions. The pages are really simple, the JSP version outputs a page which is visually identical to the JSF page. The table in question had 10 columns and 50 - 200 rows. Not a huge amount of data. I used MyFaces 1.1.3 as the JSF implementation and ran the test in JBoss 4.0.4 GA running on JDK 1.4.2. Here's the results: Table Rows Average [ms] Median [ms] Hits / Min Samples JSF Testcase50 36301300 5007 JSP Testcase50 14104030 5001 JSF Testcase100 56601050 5001 JSP Testcase100 21202700 5001 JSF Testcase200 100 100 590 5001 JSP Testcase200 26302170 5001 This data confirms the discussion in the sun forum. The JSF version started out nearly three times slower than the JSP page. The relative performance of the JSF version degraded to nearly four times slower as table rows were added. So if you are thinking about adopting JSF you should be aware of the performance hit and make sure that you can architect around the problem or get the performance benchmarks adjusted. Perceived performance is important in real life projects so it's more than a theoretical problem. I'd also like to know if anybody has ideas or code samples that make JSF perform better? View this message in context: JSF Performance ProblemsSent from the MyFaces - Users forum at Nabble.com.
dynamic sidemenu
I'm having troubles generating a side menu with the following: productsList is a list of NavigationMenuItem objects and getting: Value binding of UINavigationMenuItems with id sideNavForm1:navItemClass:_id11 does not reference an Object of type NavigationMenuItem, NavigationMenuItem[], Collection or Map Can somebody help me with generating a dynamic side menu? Shawn
JSF Performance Problems
I grabbed the attachments from the original performance bug https://javaserverfaces.dev.java.net/issues/show_bug.cgi?id=3 and ran some JMeter tests against the "JSP only" and the JSF versions. The pages are really simple, the JSP version outputs a page which is visually identical to the JSF page. The table in question had 10 columns and 50 - 200 rows. Not a huge amount of data. I used MyFaces 1.1.3 as the JSF implementation and ran the test in JBoss 4.0.4 GA running on JDK 1.4.2. Here's the results: Table Rows Average [ms] Median [ms] Hits / Min Samples JSF Testcase50 36301300 5007 JSP Testcase50 14104030 5001 JSF Testcase100 56601050 5001 JSP Testcase100 21202700 5001 JSF Testcase200 100 100 590 5001 JSP Testcase200 26302170 5001 This data confirms the discussion in the sun forum. The JSF version started out nearly three times slower than the JSP page. The relative performance of the JSF version degraded to nearly four times slower as table rows were added. So if you are thinking about adopting JSF you should be aware of the performance hit and make sure that you can architect around the problem or get the performance benchmarks adjusted. Perceived performance is important in real life projects so it's more than a theoretical problem. I'd also like to know if anybody has ideas or code samples that make JSF perform better? View this message in context: JSF Performance Problems Sent from the MyFaces - Users forum at Nabble.com.
Re: Embedded navigationMenuItem not rendering
id="#{the_product.productName}ButtonLink2" I'm fairly certain that id must be a string constant and cannot be based on a render-time variable like the_product. On 7/8/06, Garner Shawn <[EMAIL PROTECTED]> wrote: I get the outer one but the inner one isn't rendered. I've rendered the values in a dataTable so I know the_product has values.
navigationMenuItem dynamic getting java.lang.IndexOutOfBoundsException: Index: 2, Size: 1
public List getNavigationList() { ArrayList navList = new ArrayList(); if (productsList != null) { final int productsListSize = productsList.size(); for (int i = 0; i < productsListSize; i++) { NavigationMenuItem navItem = new NavigationMenuItem( productsList.get(i).getProductName() + "™", "#{ProductNavBean.navigate}"); navItem.setActionListener("#{ProductNavBean.processAction}"); navList.add(navItem); } } return navList; } getting this exception: java.lang.IndexOutOfBoundsException: Index: 2, Size: 1 at java.util.ArrayList.add(ArrayList.java:369) at javax.faces.component._ComponentChildrenList.add(_ComponentChildrenList.java:70) at org.apache.myfaces.custom.navmenu.htmlnavmenu.HtmlNavigationMenuRenderer.createHtmlCommandNavigationItem(HtmlNavigationMenuRenderer.java:365) at org.apache.myfaces.custom.navmenu.htmlnavmenu.HtmlNavigationMenuRenderer.preprocessNavigationItems(HtmlNavigationMenuRenderer.java:271) at org.apache.myfaces.custom.navmenu.htmlnavmenu.HtmlNavigationMenuRenderer.createHtmlCommandNavigationItem(HtmlNavigationMenuRenderer.java:498) at org.apache.myfaces.custom.navmenu.htmlnavmenu.HtmlNavigationMenuRenderer.preprocessNavigationItems(HtmlNavigationMenuRenderer.java:271) at org.apache.myfaces.custom.navmenu.htmlnavmenu.HtmlNavigationMenuRenderer.encodeEnd(HtmlNavigationMenuRenderer.java:126)
Embedded navigationMenuItem not rendering
I get the outer one but the inner one isn't rendered. I've rendered the values in a dataTable so I know the_product has values.
Currrent Best Available Version of MyFaces
Hi, All, Our project has passed a release mile stone. It was built on MyFaces 1.1.1, which was first available in Oct 2005, I believe. Now we are looking into upgrading to the latest version. However, I see people have different opinions on which version to take. Current release is 1.1.3. Is it a good release to go for? We don't use any fancy features, but we do use dataTable from Tomahawk a lot. Another thing is we experienced problem with f:inputDate f:inputCalendar, and eventually we gave that up and use inputText instead. Is there any improvement on these two tags?Thank you for your input!- Shawn Want to be your own boss? Learn how on Yahoo! Small Business.
Re: f:convertDateTime and Timezone
Thanks! Matthias. I think I will have to give s:convertDateTime a try. If it does not work well, I will implement a custom formatter.Again thanks!Matthias Wessendorf <[EMAIL PROTECTED]> wrote: The convertDateTime uses GMT as default*snip*If a timezone has been specified, it must be passed to the underlyingDateFormat instance. Otherwise the "GMT" timezone is used.*snip*On 7/6/06, iSquareOne LLC wrote:> Hey, all,> I think maybe someone has asked this question before. If yes, sorry for> asking the same question again. Now I noticed that the f:convertDateTime use> UTC to display time, which is very inconvenient. From the link below, I> learned that we can use s:convertDateTime which defaults to the local time.>> http://wiki.apache.org/myfaces/FAQ>> My question is - How do you solve this problem? Do you perfer> s:convertDateTime? Is there a configuration parameter that controls this> timezone, so that once we set it globally, f:convertDateTime can work> correctly?>> Thanks in advance!> > Want to be your own boss? Learn how on Yahoo! Small Business.>>-- Matthias Wessendorffuther stuff:blog: http://jroller.com/page/mwessendorfmail: mwessendorf-at-gmail-dot-com Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ countries) for 2¢/min or less.
Re: add resource problems (help needed)
Can you try that *example* from the dojo page? Maybe some js file are "outdated" ... -- After following the advice from http://wiki.apache.org/myfaces/ StreamingAddResource, my page navogation is broke. To the URL is just added a # (e.g. http://localhost:8080/page1 becomes http://localhost:8080/page1# after clicking a button to navgate to a different page, instead of actually going there) Wolf
Re: Understanding phases and UIInput inside of UIData
Andrew, I'm hitting the same problem. I spent half of Friday trying to track it down, but I haven't solved it yet. So far, I've determined that it affects all UIData components (h:dataTable, t:dataTable, and t:dataList). I've also figured out that it has something to do with incorrectly restoring the row state for EditableValueHolders in the UIData during renderResponse. The UIData should render the submitted values, but those submitted values are wrong. During applyValues, the submitted values for the UIInputs are correctly set and restored, but during renderResponse, the submitted values for the UIInputs have mysteriously changed to null.I'm still trying to figure out why the restored table state isn't the same in all phases. On 6/30/06, Andrew Robinson <[EMAIL PROTECTED]> wrote: I had thought I had my problem of phases with UIData figured out, but I am still having issues. I have a data table with input controls in it (inputText for example). Sometimes I lose data in these controls. Here are the use cases and the associated issue: If action immediate set to true, I lose all my data in the data tables If immediate is false my action never fires if a validation error occurs (this is not what I want in this use case, I want my action to ALWAYS fire) If I change the phase ID of the action to the validations phase, and there are validation errors, everything works If I chagne the phase ID of the action to the validations phase and there are no validation errors, I lose my data in the table What I am trying to figure out is the difference between #3 and #4. So, I have changed my action to execute during the processing of validations. This allows me to run my code regardless of validation errors. The side effect is if there are no validation errors, I still lose my data. Why would all my submitted values re-render in the data table when there are validation errors, but not when there are not (I am skipping update model, so in either case it never fires)? I can't see any difference in the code except that with validation errors there is at least one UI component marked as not being valid, but that doesn't seem like it should cause a behavior change with all components on the whole page. If it does how does that work (I couldn't see any such behavior in the code)? I really need to get this sorted out, so if someone could shed some light on how UIData manages to have its child components render submitted values or not I'd really appreciate it. Thanks, Andrew
Re: Is a Sortable required to be enclosed in ?
Yes, when you enable sorting on the dataTable the columns headers become links, so, the enclosing is needed. Check out [1] for more information and alternative. The code snippet you provided should work though, isn't it working?Thanks for the kind words,Catalin[1] - http://wiki.apache.org/myfaces/Upgrading_to_Tomahawk_1.1.3Paul Spencer <[EMAIL PROTECTED]> wrote: Must a be enclosed in a for sorting to work?This is my experience with Tomahawk 1.1.3, but it I does no appear to be document!Below is an example of a data table with 2 sortable columns. BTW: This is a great feature that was added in 1.1.3! Thank you to the developersPaul Spencer Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1¢/min.
Re: add resource problems (help needed)
safari only is a cool option :) -- You bet. If only my clients had the same taste as you, dev would be a lot simpler. :-) Can you try that *example* from the dojo page? Maybe some js file are "outdated" ... -- Do you mean this: http://wiki.apache.org/myfaces/WYSIWYG_Editor ? (this is what I tried already - If you want me to tyry smth else, let me know, I'll be glad to help) & If I follow the advice you given here: http://wiki.apache.org/ myfaces/StreamingAddResource, should I *remove* the adjustments I got from http:// myfaces.apache.org/tomahawk/extensionsFilter.html and only add this extra context par from streaming resource? (i.e. are they mutual exclusive or should I leave both the declaration of the extentionfilter (from "add res") & the different page tags + ctx par (from streaming res) Greetz, Wolf
Strange Action Behaviour (Infinite Loop?)
Hi All, I have a form with a dynamically created panelGrid on it. This panelGrid also contains many other panel grids along with a command button. The nested panelGrids are rotated in and out as requested by the user. However I'm experiencing a problem that when the user hits the commandButton the first time - everything is fine. The second time, the action is fired over and over until MyFaces proceeds to throw a stackoverflow exception. Exception: 2006-07-08 20:49:47,939 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/APP].[Face s Servlet]] Servlet.service() for servlet Faces Servlet threw exception java.lang.StackOverflowError at org.apache.catalina.connector.Request.getSession(Request.java:2017) at org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:82 2) at javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWr apper.java:215) at org.apache.catalina.core.ApplicationHttpRequest.getSession(ApplicationHttpRe quest.java:544) at javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWr apper.java:215) at org.apache.catalina.core.ApplicationHttpRequest.getSession(ApplicationHttpRe quest.java:544) at javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWr apper.java:215) at org.apache.catalina.core.ApplicationHttpRequest.getSession(ApplicationHttpRe quest.java:544) at javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWr apper.java:215) at org.apache.catalina.core.ApplicationHttpRequest.getSession(ApplicationHttpRe quest.java:544) at javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWr apper.java:215) at org.apache.catalina.core.ApplicationHttpRequest.getSession(ApplicationHttpRe quest.java:544) Which repeats until: at javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWr apper.java:215) at org.apache.catalina.core.ApplicationHttpRequest.getSession(ApplicationHttpRe quest.java:544) at javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWr apper.java:215) at org.apache.catalina.core.ApplicationHttpRequest.getSession(ApplicationHttpRe quest.java:544) at org.apache.myfaces.context.servlet.SessionMap.getSession(SessionMap.java:72) at org.apache.myfaces.context.servlet.SessionMap.getAttribute(SessionMap.java:4 3) at org.apache.myfaces.context.servlet.AbstractAttributeMap.get(AbstractAttribut eMap.java:87) at org.apache.myfaces.el.VariableResolverImpl.resolveVariable(VariableResolverI mpl.java:278) at org.springframework.web.jsf.DelegatingVariableResolver.resolveVariable(Deleg atingVariableResolver.java:108) at org.springframework.web.jsf.DelegatingVariableResolver.resolveVariable(Deleg atingVariableResolver.java:108) at org.apache.myfaces.config.LastVariableResolverInChain.resolveVariable(LastVa riableResolverInChain.java:42) at org.apache.myfaces.el.ValueBindingImpl$ELVariableResolver.resolveVariable(Va lueBindingImpl.java:574) at org.apache.commons.el.NamedValue.evaluate(NamedValue.java:124) at org.apache.commons.el.ComplexValue.evaluate(ComplexValue.java:140) at org.apache.commons.el.BinaryOperatorExpression.evaluate(BinaryOperatorExpres sion.java:154) at org.apache.myfaces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:383) at javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:1076) at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:59 8) at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:60 2) at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:60 2) at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:60 2) at javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:135) at org.apache.myfaces.lifecycle.LifecycleImpl.applyRequestValues(LifecycleImpl. java:219) at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:71) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:137) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:173) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher. java:672) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDis patcher.java:463) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatch er.java:398) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher .java:301) at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch