ICEfaces
  1. ICEfaces
  2. ICE-7258

Change default value for 'mandatoryResourceConfiguration' from null to 'none'

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.2
    • Fix Version/s: 2.1-Beta, 2.1-Beta2, 3.0
    • Component/s: ACE-Components
    • Labels:
      None
    • Environment:
      ICEfaces 2.1, Advanced Components Environment (ACE)
    • Assignee Priority:
      P1
    • Affects:
      Documentation (User Guide, Ref. Guide, etc.), Sample App./Tutorial, Compatibility/Configuration

      Description

      In ICEfaces 2.0.x the mandatoryResourceConfiguration parameter defaults to null, which results in all JavaScript and CSS resources for all components in the application being pre-loaded on each initial page load. This allows components to function correctly even if they are later added to the page dynamically during user interaction.

      Unfortunately, it also bloats each page load substantially (2+ MBs) and usually unnecessarily as most components are already on the page when it loads, and not added dynamically.

      To improve the out-of-the-box ICEfaces performance as it relates to page sizes and load times, we will change the default for mandatoryResourceConfiguration to 'none. This will result in no component resources being preloaded (only the resources for components on the page at initial load time will be loaded), resulting in an optimal resource load situation.

      This also means that any applications that are introducing ace components to the page dynamically (there are added to the page as part of a subsequent ajax page update and not during the initial page load) will now need to configure the mandatoryResourceConfiguration parameter (or preferably, the <icecore:config mandatoryResource=""> tag which can be specified per-view) in order to continue to function correctly.

        Issue Links

          Activity

          Ken Fyten created issue -
          Ken Fyten made changes -
          Field Original Value New Value
          Salesforce Case []
          Fix Version/s 2.1-Beta [ 10291 ]
          Affects [Documentation (User Guide, Ref. Guide, etc.), Sample App./Tutorial, Compatibility/Configuration]
          Assignee Priority P1
          Affects Version/s 2.0.2 [ 10273 ]
          Assignee Ken Fyten [ ken.fyten ]
          Ken Fyten made changes -
          Summary Change default value for 'mandatoryResourceConfiguration' from 'all to 'none' Change default value for 'mandatoryResourceConfiguration' from null to 'none'
          Salesforce Case []
          Ken Fyten made changes -
          Link This issue blocks ICE-6951 [ ICE-6951 ]
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #25648 Mon Sep 26 16:01:47 MDT 2011 ken.fyten ICE-7258 - Changed mandatoryResourceConfiguration default from null (load all) to 'none', load none.
          Files Changed
          Commit graph MODIFY /icefaces2/trunk/icefaces/core/src/main/java/org/icefaces/util/EnvUtils.java
          Ken Fyten made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Assignee Priority P1
          Resolution Fixed [ 1 ]
          Hide
          Ken Fyten added a comment - - edited

          Since the default is no longer null, which was used originally to indicate that all resources should be pre-loaded, there is now no way to set the mandatoryResourceConfiguration to a value that will engage the fully-automated resource loading behaviour, if desired.

          We need to add support for an additional value for mandatoryResourceConfiguration, "all" or maybe "auto", which would re-instate the automatic detection and loading of component resources via class path detection.

          Show
          Ken Fyten added a comment - - edited Since the default is no longer null, which was used originally to indicate that all resources should be pre-loaded, there is now no way to set the mandatoryResourceConfiguration to a value that will engage the fully-automated resource loading behaviour, if desired. We need to add support for an additional value for mandatoryResourceConfiguration, "all" or maybe "auto", which would re-instate the automatic detection and loading of component resources via class path detection.
          Ken Fyten made changes -
          Resolution Fixed [ 1 ]
          Status Resolved [ 5 ] Reopened [ 4 ]
          Assignee Priority P2
          Assignee Ken Fyten [ ken.fyten ] Ted Goddard [ ted.goddard ]
          Ted Goddard made changes -
          Assignee Ted Goddard [ ted.goddard ] Ken Fyten [ ken.fyten ]
          Ken Fyten made changes -
          Salesforce Case []
          Assignee Ken Fyten [ ken.fyten ] Mark Collette [ mark.collette ]
          Ken Fyten made changes -
          Salesforce Case []
          Assignee Priority P2 P1
          Assignee Mark Collette [ mark.collette ] Ted Goddard [ ted.goddard ]
          Ken Fyten made changes -
          Comment [ Or just revert this change to the default and add "none" to whatever sample application was of concern.

          ]
          Ken Fyten made changes -
          Comment [ I agree with Ted, we added this feature to make post-backs work by default, and allow for performance tuning from there. This is in line with DOM differencing making page updates work by default, and f:ajax tuning it if necessary. I'm not sure we want to migrate mandatoryResourceConfiguration to a mode of the post-backs being broken by default, and needing to be enabled to function. ]
          Hide
          Ken Fyten added a comment -

          An additional mandatoryResourceConfiguration parameter value string is now supported - 'all'. When 'all' is specified, ICEfaces will preload all component resources in the initial page GET for all components on the class path. This provides an easy way to ensure all component resources are present when needed, at the significant expense of loading JS resource for components that may not even be used on the page.

          The 'all' behaviour matches the previous default mandatoryResource behaviour.

          Show
          Ken Fyten added a comment - An additional mandatoryResourceConfiguration parameter value string is now supported - 'all'. When 'all' is specified, ICEfaces will preload all component resources in the initial page GET for all components on the class path. This provides an easy way to ensure all component resources are present when needed, at the significant expense of loading JS resource for components that may not even be used on the page. The 'all' behaviour matches the previous default mandatoryResource behaviour.
          Ken Fyten made changes -
          Status Reopened [ 4 ] Resolved [ 5 ]
          Assignee Priority P1
          Resolution Fixed [ 1 ]
          Ken Fyten made changes -
          Salesforce Case []
          Fix Version/s 2.1 [ 10241 ]
          Hide
          Ken Fyten added a comment -

          A regression has been found using svn rvn# 25909 in that even though the default value is still reported as being "none" in the startup log for the mandatoryResource setting, it is now loading all ACE JS resources into the head during the initial page load, just as if the default as still null (or the newer "all" setting). This is incorrect, by default the "none" setting should not be loading any ACE resources for components that aren't already on the page during the GET.

          To illustrate this issue, run the auction sample and add the icefaces-ace.jar to it and you'll see all the ace resources being loaded into the browser, even though none of them are used in the application.

          Show
          Ken Fyten added a comment - A regression has been found using svn rvn# 25909 in that even though the default value is still reported as being "none" in the startup log for the mandatoryResource setting, it is now loading all ACE JS resources into the head during the initial page load, just as if the default as still null (or the newer "all" setting). This is incorrect, by default the "none" setting should not be loading any ACE resources for components that aren't already on the page during the GET. To illustrate this issue, run the auction sample and add the icefaces-ace.jar to it and you'll see all the ace resources being loaded into the browser, even though none of them are used in the application.
          Ken Fyten made changes -
          Resolution Fixed [ 1 ]
          Status Resolved [ 5 ] Reopened [ 4 ]
          Assignee Priority P1
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #25937 Mon Oct 17 10:58:58 MDT 2011 ted.goddard removed dead code for mandatoryResource, implemented all checking in BridgeSetup (ICE-7258)
          Files Changed
          Commit graph MODIFY /icefaces2/trunk/icefaces/core/src/main/java/org/icefaces/impl/renderkit/DOMRenderKit.java
          Commit graph MODIFY /icefaces2/trunk/icefaces/core/src/main/java/org/icefaces/util/EnvUtils.java
          Commit graph MODIFY /icefaces2/trunk/icefaces/core/src/main/java/org/icefaces/impl/event/BridgeSetup.java
          Hide
          Ken Fyten added a comment -

          Mircea, looks like you forgot to change BridgeSetup.java to only use/ load the entire mandatoryResource class list from the jar if mandatoryResourceConfig != "none".

          Show
          Ken Fyten added a comment - Mircea, looks like you forgot to change BridgeSetup.java to only use/ load the entire mandatoryResource class list from the jar if mandatoryResourceConfig != "none".
          Ken Fyten made changes -
          Salesforce Case []
          Assignee Ted Goddard [ ted.goddard ] Mircea Toma [ mircea.toma ]
          Ted Goddard made changes -
          Assignee Mircea Toma [ mircea.toma ] Ted Goddard [ ted.goddard ]
          Hide
          Ted Goddard added a comment -

          Fix checked in and tested with both icecore:config and web.xml variants. Recommend additional testing in customer application.

          Show
          Ted Goddard added a comment - Fix checked in and tested with both icecore:config and web.xml variants. Recommend additional testing in customer application.
          Ted Goddard made changes -
          Status Reopened [ 4 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #26014 Fri Oct 21 15:27:28 MDT 2011 ted.goddard merging in trunk changes for (ICE-7322) and (ICE-7258)
          Files Changed
          Commit graph MODIFY /icefaces2/tags/icefaces-core-2.1.0.BETA2/icefaces/core/src/main/java/org/icefaces/impl/event/BridgeSetup.java
          Commit graph MODIFY /icefaces2/tags/icefaces-core-2.1.0.BETA2/icefaces/core/src/main/javascript/application.js
          Commit graph MODIFY /icefaces2/tags/icefaces-core-2.1.0.BETA2/icefaces/core/src/main/java/org/icefaces/util/EnvUtils.java
          Commit graph MODIFY /icefaces2/tags/icefaces-core-2.1.0.BETA2/icefaces/core/src/main/java/org/icefaces/impl/renderkit/DOMRenderKit.java
          Commit graph MODIFY /icefaces2/tags/icefaces-core-2.1.0.BETA2/icefaces/core
          Ken Fyten made changes -
          Salesforce Case []
          Fix Version/s 2.1-Beta2 [ 10294 ]
          Ken Fyten made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

            People

            • Assignee:
              Ted Goddard
              Reporter:
              Ken Fyten
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: