Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.2.BETA, 4.2
    • Component/s: None
    • Labels:
      None
    • Environment:
      all
    • Assignee Priority:
      P2

      Description

      Reduce size of rendered markup, especially the IDs and JS event handlers.

        Issue Links

          Activity

          Hide
          Mircea Toma added a comment -

          I have looked into reducing the size of the markup by way of shortening (as much as theoretically possible) the client IDs. As a simple test all the assigned IDs were removed from the templates thus forcing JSF to generate unique IDs. These generated IDs are much shorted (although not the shortest possible). Comparing the size of the markup rendered with long IDs vs short IDs shown savings of around 1.5%. The savings in the amount of markup don't seem to justify spending any more effort in this direction. Also, the implementation would be quite difficult since JSF does rely on the parse-ablity of the client IDs (similar to a path structure).

          Show
          Mircea Toma added a comment - I have looked into reducing the size of the markup by way of shortening (as much as theoretically possible) the client IDs. As a simple test all the assigned IDs were removed from the templates thus forcing JSF to generate unique IDs. These generated IDs are much shorted (although not the shortest possible). Comparing the size of the markup rendered with long IDs vs short IDs shown savings of around 1.5%. The savings in the amount of markup don't seem to justify spending any more effort in this direction. Also, the implementation would be quite difficult since JSF does rely on the parse-ablity of the client IDs (similar to a path structure).
          Hide
          Mircea Toma added a comment - - edited

          Another method to reduce the size of the markup is to factor out functions for the JS event listeners and/or the inline JS script code. The savings are even more significant when these components are used inside iterating parents (such as data tables).
          The following components are best suited to have their renderers refactored: ace:autoCompleteEntry, ace:dataTable, ace:fileEntry, ace:accordion, ace:menuButton, ace:panel, ace:toolTip, ace:menu.

          Show
          Mircea Toma added a comment - - edited Another method to reduce the size of the markup is to factor out functions for the JS event listeners and/or the inline JS script code. The savings are even more significant when these components are used inside iterating parents (such as data tables). The following components are best suited to have their renderers refactored: ace:autoCompleteEntry , ace:dataTable , ace:fileEntry , ace:accordion , ace:menuButton , ace:panel , ace:toolTip , ace:menu .
          Hide
          Carmen Cristurean added a comment - - edited

          Jenkins IF4 trunk Build #2063/Tomcat7.0.42 testing found the following regressions:

          1) Showcase - General Search function issue
          When navigating to a component demo via the search function, the left-side menu panel corresponding to the group of components does not open up.
          As example, when searching and selecting ace:autoCompleteEntry > Overview, the corresponding demo is rendered, however the panel for the "Input" type components does not open up to show all other demos for autoCompleteEntry.
          This issue cannot be reproduced with Jenkins build #2056.

          2) Showcase > Tooltip > Global
          On demo page load, a JS error is written to the browser console (all browsers). This issue also, cannot be reproduced with Jenkins build #2056.
          FF47:
          SyntaxError: missing ] in computed property name
          http://localhost:8080/showcase/showcase.jsf?grp=ace:tooltip&exp=Global
          Line 241

          IE11:
          SCRIPT1028: Expected identifier, string or number
          File: showcase.jsf, Line: 1, Column: 153

          Chrome:
          VM190:1 Uncaught SyntaxError: Unexpected token ,runScripts @ jsf.js.jsf?ln=javax.faces&stage=Development&v=4_2_0_160830:626doUpdate @ jsf.js.jsf?ln=javax.faces&stage=Development&v=4_2_0_160830:1476response @ jsf.js.jsf?ln=javax.faces&stage=Development&v=4_2_0_160830:2865onComplete @ jsf.js.jsf?ln=javax.faces&stage=Development&v=4_2_0_160830:1779AjaxEngine.req.xmlReq.onreadystatechange @ jsf.js.jsf?ln=javax.faces&stage=Development&v=4_2_0_160830:1760

          3) ace:tooltip QA test application/ Tooltip Iterative Selection test fails:
          The tooltips must display an image with the "Icesoft Technologies" logo, and they fail following the changes for this JIRA.
          QA app: http://dev.icesoft.com/svn/repo/qa/trunk/Regression-Icefaces4/Sparkle/Nightly/tooltip
          Demo: /tooltipSelectIterative.jsf

          Show
          Carmen Cristurean added a comment - - edited Jenkins IF4 trunk Build #2063/Tomcat7.0.42 testing found the following regressions: 1) Showcase - General Search function issue When navigating to a component demo via the search function, the left-side menu panel corresponding to the group of components does not open up. As example, when searching and selecting ace:autoCompleteEntry > Overview, the corresponding demo is rendered, however the panel for the "Input" type components does not open up to show all other demos for autoCompleteEntry. This issue cannot be reproduced with Jenkins build #2056. 2) Showcase > Tooltip > Global On demo page load, a JS error is written to the browser console (all browsers). This issue also, cannot be reproduced with Jenkins build #2056. FF47: SyntaxError: missing ] in computed property name http://localhost:8080/showcase/showcase.jsf?grp=ace:tooltip&exp=Global Line 241 IE11: SCRIPT1028: Expected identifier, string or number File: showcase.jsf, Line: 1, Column: 153 Chrome: VM190:1 Uncaught SyntaxError: Unexpected token ,runScripts @ jsf.js.jsf?ln=javax.faces&stage=Development&v=4_2_0_160830:626doUpdate @ jsf.js.jsf?ln=javax.faces&stage=Development&v=4_2_0_160830:1476response @ jsf.js.jsf?ln=javax.faces&stage=Development&v=4_2_0_160830:2865onComplete @ jsf.js.jsf?ln=javax.faces&stage=Development&v=4_2_0_160830:1779AjaxEngine.req.xmlReq.onreadystatechange @ jsf.js.jsf?ln=javax.faces&stage=Development&v=4_2_0_160830:1760 3) ace:tooltip QA test application/ Tooltip Iterative Selection test fails: The tooltips must display an image with the "Icesoft Technologies" logo, and they fail following the changes for this JIRA. QA app: http://dev.icesoft.com/svn/repo/qa/trunk/Regression-Icefaces4/Sparkle/Nightly/tooltip Demo: /tooltipSelectIterative.jsf
          Hide
          Mircea Toma added a comment -

          Fixed 2) by ensuring that 'txt' parameter for ice.ace.Tooltip.activate function is always added.

          Show
          Mircea Toma added a comment - Fixed 2) by ensuring that 'txt' parameter for ice.ace.Tooltip.activate function is always added.
          Hide
          Mircea Toma added a comment -

          Fixed 3) by running body of ice.ace.Tooltip.activate function as a closure called by ice.ace.jq (just the way it was called before the refactoring).

          Show
          Mircea Toma added a comment - Fixed 3) by running body of ice.ace.Tooltip.activate function as a closure called by ice.ace.jq (just the way it was called before the refactoring).
          Hide
          Carmen Cristurean added a comment -

          Verified 2) and 3) with IF4 trunk r.49144 on IE8/11, MS Edge, FF47, Chrome52/Tomcat7.0.42.

          Show
          Carmen Cristurean added a comment - Verified 2) and 3) with IF4 trunk r.49144 on IE8/11, MS Edge, FF47, Chrome52/Tomcat7.0.42.
          Hide
          Mircea Toma added a comment - - edited

          Fix 1) by passing the select index parameter as type number (not string) into ice.ace.AccordionPanel.activate function.

          Show
          Mircea Toma added a comment - - edited Fix 1) by passing the select index parameter as type number (not string) into ice.ace.AccordionPanel.activate function.
          Hide
          Carmen Cristurean added a comment -

          Verified 1) with IF4 trunk r.49159 on IE8/11, MS Edge, FF47, Chrome52/Tomcat7.0.42.

          Show
          Carmen Cristurean added a comment - Verified 1) with IF4 trunk r.49159 on IE8/11, MS Edge, FF47, Chrome52/Tomcat7.0.42.

            People

            • Assignee:
              Mircea Toma
              Reporter:
              Mircea Toma
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: