ICEfaces
  1. ICEfaces
  2. ICE-5737

Factor and normalize use of system event listeners

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0-Alpha2
    • Fix Version/s: 2.1-Beta, 3.0
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      ICEfaces 2 JSF 2
    • Assignee Priority:
      P3

      Description

      We're currently relying heavily on System Event Listeners to modify the component tree dynamically. We need to review the use of these listeners to ensure that we're using them properly and efficiently.

        Activity

        Deryk Sinotte created issue -
        Hide
        Deryk Sinotte added a comment -

        Targetting for beta and assigning to Ted for now. This will likely be more of a group exercise and be part of a more general review process of the current product.

        Show
        Deryk Sinotte added a comment - Targetting for beta and assigning to Ted for now. This will likely be more of a group exercise and be part of a more general review process of the current product.
        Deryk Sinotte made changes -
        Field Original Value New Value
        Salesforce Case []
        Fix Version/s 2.0-Beta [ 10231 ]
        Assignee Ted Goddard [ ted.goddard ]
        Ken Fyten made changes -
        Salesforce Case []
        Fix Version/s 2.0.0 [ 10230 ]
        Fix Version/s 2.0-Beta [ 10231 ]
        Hide
        Ken Fyten added a comment -

        Task for 2.0 FCS is limited to testing / timing a specific System Event Listener to determine if there is significant overhead related to using multiple listeners vs. fewer.

        Show
        Ken Fyten added a comment - Task for 2.0 FCS is limited to testing / timing a specific System Event Listener to determine if there is significant overhead related to using multiple listeners vs. fewer.
        Hide
        Ted Goddard added a comment -

        Mojarra source code shows reflection for each invocation of a SystemEventListener, so there is definitely performance overhead that could be avoided. In any case, this is an optimization, so can be addressed after 2.0.

        Show
        Ted Goddard added a comment - Mojarra source code shows reflection for each invocation of a SystemEventListener, so there is definitely performance overhead that could be avoided. In any case, this is an optimization, so can be addressed after 2.0.
        Hide
        Ted Goddard added a comment -

        If profiling shows a clear need for performance improvements, this can be investigated sooner.

        Show
        Ted Goddard added a comment - If profiling shows a clear need for performance improvements, this can be investigated sooner.
        Ted Goddard made changes -
        Salesforce Case []
        Fix Version/s 2.1 [ 10241 ]
        Fix Version/s 2.0.0 [ 10230 ]
        Ken Fyten made changes -
        Salesforce Case []
        Assignee Priority P3
        Assignee Ted Goddard [ ted.goddard ] Jack van Ooststroom [ jack.van.ooststroom ]
        Jack Van Ooststroom made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #25256 Tue Aug 16 12:06:55 MDT 2011 jack.van.ooststroom Fixed JIRA ICE-5737 : Factor and normalize use of system event listeners
        Files Changed
        Commit graph MODIFY /icefaces2/trunk/icefaces/core/src/main/java/org/icefaces/impl/event/FormSubmit.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #25257 Tue Aug 16 12:14:02 MDT 2011 jack.van.ooststroom Fixed JIRA ICE-5737 : Factor and normalize use of system event listeners
        Files Changed
        Commit graph MODIFY /icefaces2/trunk/icefaces/core/src/main/java/org/icefaces/impl/event/WindowAndViewIDSetup.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #25258 Tue Aug 16 12:23:03 MDT 2011 jack.van.ooststroom Fixed JIRA ICE-5737 : Factor and normalize use of system event listeners
        Files Changed
        Commit graph MODIFY /icefaces2/trunk/icefaces/core/src/main/java/org/icefaces/impl/event/FormSubmit.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #25259 Tue Aug 16 13:03:12 MDT 2011 jack.van.ooststroom Fixed JIRA ICE-5737 : Factor and normalize use of system event listeners
        Files Changed
        Commit graph MODIFY /icefaces2/trunk/icefaces/core/src/main/java/org/icefaces/impl/event/HeadBodyListener.java
        Commit graph MODIFY /icefaces2/trunk/icefaces/core/src/main/resources/META-INF/faces-config.xml
        Commit graph MODIFY /icefaces2/trunk/icefaces/core/src/main/java/org/icefaces/impl/push/servlet/ICEpushResourceHandler.java
        Commit graph MODIFY /icefaces2/trunk/icefaces/core/src/main/java/org/icefaces/impl/event/BridgeSetup.java
        Hide
        Jack Van Ooststroom added a comment - - edited

        Initial check-in of improvements done for:

        • BridgeSetup
        • FormSubmit
        • HeadBodyListener
        • WindowAndViewIDSetup
        • faces-config.xml
        Show
        Jack Van Ooststroom added a comment - - edited Initial check-in of improvements done for: BridgeSetup FormSubmit HeadBodyListener WindowAndViewIDSetup faces-config.xml
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #25260 Tue Aug 16 14:13:15 MDT 2011 jack.van.ooststroom Fixed JIRA ICE-5737 : Factor and normalize use of system event listeners
        Files Changed
        Commit graph MODIFY /icefaces2/trunk/icefaces/core/src/main/java/org/icefaces/impl/event/DebugTagListener.java
        Commit graph MODIFY /icefaces2/trunk/icefaces/core/src/main/java/org/icefaces/impl/push/servlet/ICEpushResourceHandler.java
        Commit graph MODIFY /icefaces2/trunk/icefaces/core/src/main/java/org/icefaces/impl/event/MojarraDebugTagListener.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #25268 Wed Aug 17 12:54:05 MDT 2011 jack.van.ooststroom Fixed JIRA ICE-5737 : Factor and normalize use of system event listeners
        Files Changed
        Commit graph MODIFY /icefaces2/trunk/icefaces/core/src/main/java/org/icefaces/impl/push/servlet/ICEpushResourceHandler.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #25275 Thu Aug 18 10:07:33 MDT 2011 jack.van.ooststroom Fixed JIRA ICE-5737 : Factor and normalize use of system event listeners
        Files Changed
        Commit graph MODIFY /icefaces2/trunk/icefaces/core/src/main/java/org/icefaces/impl/event/HeadBodyListener.java
        Commit graph MODIFY /icefaces2/trunk/icefaces/core/src/main/resources/META-INF/faces-config.xml
        Hide
        Deryk Sinotte added a comment -

        The use of a specific Mojarra class in the ICEPushResourceHandler causes problems under MyFaces:

        if (projectStage != null && !projectStage.equals("Production"))

        { facesContext.getApplication().subscribeToEvent(PostAddToViewEvent.class, com.sun.faces.facelets.tag.ui.UIDebug.class, new DebugTagListener()); }

        ...
        Caused by: java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
        at org.apache.myfaces.shared.util.ClassUtils.buildApplicationObject(ClassUtils.java:539)
        ... 15 more
        Caused by: java.lang.NoClassDefFoundError: com/sun/faces/facelets/tag/ui/UIDebug
        at org.icefaces.impl.push.servlet.ICEpushResourceHandler.<init>(ICEpushResourceHandler.java:80)
        ... 20 more
        Caused by: java.lang.ClassNotFoundException: com.sun.faces.facelets.tag.ui.UIDebug
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1676)
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1521)
        ... 21 more

        Show
        Deryk Sinotte added a comment - The use of a specific Mojarra class in the ICEPushResourceHandler causes problems under MyFaces: if (projectStage != null && !projectStage.equals("Production")) { facesContext.getApplication().subscribeToEvent(PostAddToViewEvent.class, com.sun.faces.facelets.tag.ui.UIDebug.class, new DebugTagListener()); } ... Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at org.apache.myfaces.shared.util.ClassUtils.buildApplicationObject(ClassUtils.java:539) ... 15 more Caused by: java.lang.NoClassDefFoundError: com/sun/faces/facelets/tag/ui/UIDebug at org.icefaces.impl.push.servlet.ICEpushResourceHandler.<init>(ICEpushResourceHandler.java:80) ... 20 more Caused by: java.lang.ClassNotFoundException: com.sun.faces.facelets.tag.ui.UIDebug at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1676) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1521) ... 21 more
        Hide
        Deryk Sinotte added a comment -

        Perhaps simply wrapping the relevant code in EnvUtil.isMojarra() check would suffice.

        Show
        Deryk Sinotte added a comment - Perhaps simply wrapping the relevant code in EnvUtil.isMojarra() check would suffice.
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #25350 Tue Aug 30 12:40:07 MDT 2011 jack.van.ooststroom Fixed JIRA ICE-5737 : Factor and normalize use of system event listeners; revert change to MojarraDebugTagListener as it breaks MyFaces support.
        Files Changed
        Commit graph MODIFY /icefaces2/trunk/icefaces/core/src/main/java/org/icefaces/impl/push/servlet/ICEpushResourceHandler.java
        Commit graph MODIFY /icefaces2/trunk/icefaces/core/src/main/java/org/icefaces/impl/event/MojarraDebugTagListener.java
        Hide
        Jack Van Ooststroom added a comment -

        Reverted the HeadBodyListener and BridgeSetup optimizations as it broke our portlet support.

        Partly reverted one of the optimizations. It now checks for the String com.sun.faces.facelets.tag.ui.UIDebug again instead of the class.

        Originally the optimizations seemed to have improve performance of the lifecycle by a bit over 10%. After reverting some of the optimizations there is still a performance gain of about 5% left.

        Show
        Jack Van Ooststroom added a comment - Reverted the HeadBodyListener and BridgeSetup optimizations as it broke our portlet support. Partly reverted one of the optimizations. It now checks for the String com.sun.faces.facelets.tag.ui.UIDebug again instead of the class. Originally the optimizations seemed to have improve performance of the lifecycle by a bit over 10%. After reverting some of the optimizations there is still a performance gain of about 5% left.
        Ken Fyten made changes -
        Fix Version/s 3.1 [ 10312 ]
        Fix Version/s 3.0 [ 10241 ]
        Hide
        Jack Van Ooststroom added a comment -

        No additional work has been done for this one lately. Some of the original improvements are still in causing the 5% performance increase. Marking this one as FIXED now.

        Show
        Jack Van Ooststroom added a comment - No additional work has been done for this one lately. Some of the original improvements are still in causing the 5% performance increase. Marking this one as FIXED now.
        Jack Van Ooststroom made changes -
        Status In Progress [ 3 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Ken Fyten made changes -
        Fix Version/s 3.0.RC1 [ 10300 ]
        Fix Version/s 3.1 [ 10312 ]
        Ken Fyten made changes -
        Salesforce Case []
        Fix Version/s 3.0 [ 10241 ]
        Fix Version/s 2.1-Beta [ 10291 ]
        Fix Version/s 3.0.RC1 [ 10300 ]
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Jack Van Ooststroom
            Reporter:
            Deryk Sinotte
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: