Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0-Beta2
    • Fix Version/s: EE-2.0.0.GA, 2.0.2
    • Component/s: ACE-Components, Framework
    • Labels:
      None
    • Environment:
      ACE

      Description

      ACE components have numerous javascript and CSS dependencies. Each is currently resulting in a separate GET, which drastically slows page load. We should find a means of coalescing these requests into a smaller number of GET requests.

        Issue Links

          Activity

          Hide
          Mark Collette added a comment -

          With ICE-6153 MandatoryResourceComponent functionality, we have access to the complete list of ACE dependencies all in one place, at application startup. All we need to do is refactor the annotation processing to occur more at start-up than its current implementation, which is split between start-up and render time. This would be a good optimisation to make anyhow.

          Once we have the lists of all javascript dependencies and css dependencies, we could generate a single concatenated file for each, and then add those to the head instead of the individual files. It might not make sense for it to be a single file, but possibly to be a file per library. We should try to serve the least possible number of files, and only make it granular as needed.

          Later, aspects of this might be worked into the icefaces-ace.jar build process, so that we only include the relevantly used javascript files. So, keep that in mind when implementing this.

          We should decide what kind of options should control this. For example, should it be possible to disable this, so that the individual files are still served instead of the concatenated one?

          Show
          Mark Collette added a comment - With ICE-6153 MandatoryResourceComponent functionality, we have access to the complete list of ACE dependencies all in one place, at application startup. All we need to do is refactor the annotation processing to occur more at start-up than its current implementation, which is split between start-up and render time. This would be a good optimisation to make anyhow. Once we have the lists of all javascript dependencies and css dependencies, we could generate a single concatenated file for each, and then add those to the head instead of the individual files. It might not make sense for it to be a single file, but possibly to be a file per library. We should try to serve the least possible number of files, and only make it granular as needed. Later, aspects of this might be worked into the icefaces-ace.jar build process, so that we only include the relevantly used javascript files. So, keep that in mind when implementing this. We should decide what kind of options should control this. For example, should it be possible to disable this, so that the individual files are still served instead of the concatenated one?
          Hide
          Mark Collette added a comment - - edited

          ICE-5886 and ICE-6194 seem to be trying to address the same issue.

          But, there is a main difference, as ICE-5886 is a framework feature, whereas this jira is specifically for ACE, and so can make assumptions about ACE requirements, and the actual javacript that ACE uses.

          Show
          Mark Collette added a comment - - edited ICE-5886 and ICE-6194 seem to be trying to address the same issue. But, there is a main difference, as ICE-5886 is a framework feature, whereas this jira is specifically for ACE, and so can make assumptions about ACE requirements, and the actual javacript that ACE uses.
          Hide
          Mark Collette added a comment -

          ICE-6727 grapples with the benefit of using the yui3 loader to load our own javascript, since our framework doesn't support combo url loading, which means that the yui3 loader is forced to do multiple GET requests, whereas a non-loader solution could manually concatenate resources and serve them out as a single url, for a single GET request.

          But, if our framework did support yui combo urls, then it wouldn't matter. The loader could use combo, and the static resources could just use a combo url, and every way resources are loaded would use reduced GET requests.

          Show
          Mark Collette added a comment - ICE-6727 grapples with the benefit of using the yui3 loader to load our own javascript, since our framework doesn't support combo url loading, which means that the yui3 loader is forced to do multiple GET requests, whereas a non-loader solution could manually concatenate resources and serve them out as a single url, for a single GET request. But, if our framework did support yui combo urls, then it wouldn't matter. The loader could use combo, and the static resources could just use a combo url, and every way resources are loaded would use reduced GET requests.
          Hide
          Mark Collette added a comment -

          One potential sub-task for this would be to do ICE-6103.

          Show
          Mark Collette added a comment - One potential sub-task for this would be to do ICE-6103.
          Hide
          Mark Collette added a comment - - edited

          ace/component/build.xml now takes all our javascript, except fileEntry.js, and combines it into a single combined.js file, which all the Meta classes now load instead of util.js, component.js and their own js separately.

          scratchpads/ICE-6698
          Subversion 24392

          /ossrepo/icefaces2/branches/icefaces-2.0.x-maintenance/
          Subversion 24415

          trunk
          Subversion 24445

          Show
          Mark Collette added a comment - - edited ace/component/build.xml now takes all our javascript, except fileEntry.js, and combines it into a single combined.js file, which all the Meta classes now load instead of util.js, component.js and their own js separately. scratchpads/ICE-6698 Subversion 24392 /ossrepo/icefaces2/branches/icefaces-2.0.x-maintenance/ Subversion 24415 trunk Subversion 24445
          Hide
          Mark Collette added a comment - - edited

          Combined all the ACE CSS files into one CSS file, and updated the Meta classes to use that one instead of the individual CSS files. Testing showed it working in most browsers except IE. The defered initialised server side tabSet was not showing up properly, until mousing over it. I noticed the inline @import statements, and remembered something about some browser needing them at the top of the file, which they no longer were, when concatenated. Some website optimisation tutorials said not to use @import, so I just commented out the imports and put the references right in the Meta class. For CSS files that were then empty, I didn't put a reference to combined.css in them, and only put the @import reference. Probably unnecessary. For files that had anything else, I included both in the Meta. This then worked in IE 7.

          scratchpads/ICE-6698
          Subversion 24394

          /ossrepo/icefaces2/branches/icefaces-2.0.x-maintenance/
          Subversion 24417

          trunk
          Subversion 24447

          Show
          Mark Collette added a comment - - edited Combined all the ACE CSS files into one CSS file, and updated the Meta classes to use that one instead of the individual CSS files. Testing showed it working in most browsers except IE. The defered initialised server side tabSet was not showing up properly, until mousing over it. I noticed the inline @import statements, and remembered something about some browser needing them at the top of the file, which they no longer were, when concatenated. Some website optimisation tutorials said not to use @import, so I just commented out the imports and put the references right in the Meta class. For CSS files that were then empty, I didn't put a reference to combined.css in them, and only put the @import reference. Probably unnecessary. For files that had anything else, I included both in the Meta. This then worked in IE 7. scratchpads/ICE-6698 Subversion 24394 /ossrepo/icefaces2/branches/icefaces-2.0.x-maintenance/ Subversion 24417 trunk Subversion 24447

            People

            • Assignee:
              Mark Collette
              Reporter:
              Mark Collette
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: