2 Replies Latest reply on Aug 14, 2008 11:30 AM by bwobbones

    Richfaces Filter as a PhaseListener?

    bwobbones

      Hi,

      Sorry if my understanding is wrong here...using Richfaces 3.1.6.

      I'm having performance problems with richfaces across our very large enterprise application. We've found that the cause of these problems is that the Richfaces filter is running the FastHtmlParser on every page in the application, regardless of whether they have a4j: or rich: tags (we've tried all combinations of the context-params for the filter with no luck).

      One suggestion that we had was to change the filter to only run when certain pages are requested, but this has one major problem in that pages are submitted to the page they are coming from, not going to.

      For example, if I'm on the one.xhtml page and want to get to the two.xhtml page, the filter code is run before we hit the JSF lifecycle where the viewIds are set and I have no opportunity to say "only run the filter code on two.xhtml" as the response.getRequestURL() is one.xhtml and the view id is still null.

      I was thinking that a possible implementation might be to get rid of the filter and move all of the code into the JSF lifecycle as a phase listener, is that feasible?

      Any other ideas as to how to restrict the parsers to run only for specified pages or pages that contain appropriate tags?