ICEfaces
  1. ICEfaces
  2. ICE-2831

inputRichText too slow to show (4 seconds)

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.7Beta1
    • Fix Version/s: 1.7RC1, 1.7
    • Labels:
      None
    • Environment:
      All

      Description

      Initial load of page with only inputRichText on it:

      Time (ms)
         31 http://localhost:8080/phases/block/resource/LTQ5MTYyMDg1Mw==/
        141 http://localhost:8080/phases/block/resource/LTc4NTk0MDYzMQ==
         78 http://localhost:8080/phases/xmlhttp/blank
        125 http://localhost:8080/phases/block/resource/LTQ5MTYyMDg1Mw==/editor/fckeditor.html?InstanceName=j_id6%3Aj_id9&Toolbar=Default
        422 http://localhost:8080/phases/block/resource/LTQ5MTYyMDg1Mw==/editor/js/fckeditorcode_gecko.js
         32 http://localhost:8080/phases/block/resource/LTQ5MTYyMDg1Mw==/fckconfig.js
         93 http://localhost:8080/phases/block/resource/LTQ5MTYyMDg1Mw==/editor/skins/default/fck_editor.css
        218 http://localhost:8080/phases/block/resource/LTQ5MTYyMDg1Mw==/editor/lang/en.js
         47 http://localhost:8080/phases/block/resource/LTQ5MTYyMDg1Mw==/editor/skins/default/fck_editor.css
         32 http://localhost:8080/phases/block/resource/LTQ5MTYyMDg1Mw==/editor/images/spacer.gif
        516 http://localhost:8080/phases/block/resource/LTQ5MTYyMDg1Mw==/editor/skins/default/fck_editor.css
      1,130 http://localhost:8080/phases/block/resource/LTQ5MTYyMDg1Mw==/editor/css/fck_editorarea.css
        140 http://localhost:8080/phases/block/resource/LTQ5MTYyMDg1Mw==/fckstyles.xml
      1,140 http://localhost:8080/phases/block/resource/LTQ5MTYyMDg1Mw==/editor/skins/default/images/toolbar.buttonarrow.gif
        469 http://localhost:8080/phases/block/resource/LTQ5MTYyMDg1Mw==/editor/skins/default/images/toolbar.collapse.gif
        422 http://localhost:8080/phases/block/resource/LTQ5MTYyMDg1Mw==/editor/skins/default/images/toolbar.start.gif
        406 http://localhost:8080/phases/block/resource/LTQ5MTYyMDg1Mw==/editor/skins/default/fck_strip.gif
        156 http://localhost:8080/phases/block/resource/LTQ5MTYyMDg1Mw==/editor/css/fck_editorarea.css
        188 http://localhost:8080/phases/block/resource/LTQ5MTYyMDg1Mw==/editor/css/fck_showtableborders_gecko.css
        282 http://localhost:8080/phases/block/resource/LTQ5MTYyMDg1Mw==/editor/css/fck_internal.css
      ----- ----
      4,850 23 requests, 201 KB

      Subsequent loads, a half hour later, took less than one second less time to download, and had just as many requests.

      Notes
      --------
      - We should setup caching for "blank", set to forever
      - Caching is not setup, and the files are set to expire in half an hour, from when they were first served. So, after using the app for over a half hour, they're expired.
      - The CSS and most of the JS are not minified
      - For some reason, some of the CSS files are getting served out several times
      - Some small files ~2KB seem to be taking disproportionately long to serve. Might be just due to disk access. Might be worth caching in RAM in an application scoped bean.
      - We're getting killed by all the copyright notices in every file

        Issue Links

          Activity

          Hide
          Ken Fyten added a comment -

          Need to isolate why we're seeing multiple requests for the same resources.

          Also need to configure the resource api use to cache these resources for a longer duration (1 week)? At least 1 day. The only time they will change is if a new ICEfaces version is used, and that would require a server restart, etc.

          Show
          Ken Fyten added a comment - Need to isolate why we're seeing multiple requests for the same resources. Also need to configure the resource api use to cache these resources for a longer duration (1 week)? At least 1 day. The only time they will change is if a new ICEfaces version is used, and that would require a server restart, etc.
          Hide
          Ken Fyten added a comment -

          I suspect the reason for the multiple requests is related to the reload mechanism used whenever the HEAD of the page needs to be updated (such as when new JS links are added for the inputRichText component).

          Basically, the HEAD is updated to add the new JS link, which requests the JS, then the page is reloaded by the bridge to ensure the revised HEAD is used, the the JS is requested a second time. As the reload mechanism for HEAD updates is necessary at this time we need to rely on browser HTTP caching of the resources to reduce the latency and overhead associated with the multiple requests.

          Show
          Ken Fyten added a comment - I suspect the reason for the multiple requests is related to the reload mechanism used whenever the HEAD of the page needs to be updated (such as when new JS links are added for the inputRichText component). Basically, the HEAD is updated to add the new JS link, which requests the JS, then the page is reloaded by the bridge to ensure the revised HEAD is used, the the JS is requested a second time. As the reload mechanism for HEAD updates is necessary at this time we need to rely on browser HTTP caching of the resources to reduce the latency and overhead associated with the multiple requests.
          Hide
          Mircea Toma added a comment -

          "We should setup caching for "blank", set to forever"

          Added cache controls to the blank page.

          "Caching is not setup, and the files are set to expire in half an hour, from when they were first served. So, after using the app for over a half hour, they're expired."

          Currently resource that are served through the ResourceRegistry API get a expiration time based on session's forecasted timeout. Next time the browser asks for the registered resources the server will send a HTTP 304 if the content is still valid (also with an updated expiration time).

          "For some reason, some of the CSS files are getting served out several times"

          This comment needs to be more specific. Maybe a separate issue would be better.

          "The CSS and most of the JS are not minified"
          "We're getting killed by all the copyright notices in every file"

          This should be a separate issue that is more related to the build process.

          "Some small files ~2KB seem to be taking disproportionately long to serve. Might be just due to disk access. Might be worth caching in RAM in an application scoped bean."

          A separate issue & test case would be useful.

          Show
          Mircea Toma added a comment - "We should setup caching for "blank", set to forever" Added cache controls to the blank page. "Caching is not setup, and the files are set to expire in half an hour, from when they were first served. So, after using the app for over a half hour, they're expired." Currently resource that are served through the ResourceRegistry API get a expiration time based on session's forecasted timeout. Next time the browser asks for the registered resources the server will send a HTTP 304 if the content is still valid (also with an updated expiration time). "For some reason, some of the CSS files are getting served out several times" This comment needs to be more specific. Maybe a separate issue would be better. "The CSS and most of the JS are not minified" "We're getting killed by all the copyright notices in every file" This should be a separate issue that is more related to the build process. "Some small files ~2KB seem to be taking disproportionately long to serve. Might be just due to disk access. Might be worth caching in RAM in an application scoped bean." A separate issue & test case would be useful.

            People

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

              Dates

              • Created:
                Updated:
                Resolved: