Uploaded image for project: 'Kuali Rice Development'
  1. Kuali Rice Development
  2. KULRICE-7928

initBubblePopups function significantly reduces performance in some browsers

    Details

    • Type: Bug Fix
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.2.0-m3, 2.2
    • Component/s: Development
    • Security Level: Public (Public: Anyone can view)
    • Labels:
      None
    • Rice Module:
      KRAD
    • Application Requirement:
      KS My Plan
    • KAI Review Status:
      Not Required
    • KTI Review Status:
      Not Required

      Description

      The initBubblePopups function runs the CreateBubblePopup method on a large selection of dom elements. initBubblePopups is executed each time the runHiddenScripts function is executed, which is on the initial page load and for the MyPlan "Plan" view on 3 different component retrievals are also executed on page load which results in the initBubblePopups function being run 4 times at load.

      IE and Firefox seem to the browsers most effected by this.

        Attachments

          Activity

          Hide
          garettg Garett Gowens added a comment - - edited

          I was playing around with the initBubblePopups function and the selection for this function was executing on 488 elements. We realized then thats because there are numerous hidden inputs for scripts. I changed the selection to exclude hidden inputs and the selection was reduced to 18. Would there be a reason the CreateBubblePopup method would need to be executed on hidden inputs?

          Excluding hidden inputs on the selection:
          jQuery("input, select, textarea, "
          + " label, .uif-tooltip").not("input[type='hidden']").CreateBubblePopup(

          { manageMouseEvents:false, themePath:"../krad/plugins/tooltip/jquerybubblepopup-theme/" }

          );

          Show
          garettg Garett Gowens added a comment - - edited I was playing around with the initBubblePopups function and the selection for this function was executing on 488 elements. We realized then thats because there are numerous hidden inputs for scripts. I changed the selection to exclude hidden inputs and the selection was reduced to 18. Would there be a reason the CreateBubblePopup method would need to be executed on hidden inputs? Excluding hidden inputs on the selection: jQuery("input, select, textarea, " + " label, .uif-tooltip").not("input [type='hidden'] ").CreateBubblePopup( { manageMouseEvents:false, themePath:"../krad/plugins/tooltip/jquerybubblepopup-theme/" } );
          Hide
          garettg Garett Gowens added a comment -

          Kamal and I were discussing the Bubble Popup more and were wondering, rather initiating the CreateBubblePopup method on the page load on all the elements needed, that maybe it would be better to run the method at the beginning of the event that shows the bubble popup, but put a check in to see if it already has a bubble popup.

          So something like this before setting the popup options and showing it:

          if(!jQuery("#" + id).HasBubblePopup()) jQuery("#" + id).CreateBubblePopup(options);

          Show
          garettg Garett Gowens added a comment - Kamal and I were discussing the Bubble Popup more and were wondering, rather initiating the CreateBubblePopup method on the page load on all the elements needed, that maybe it would be better to run the method at the beginning of the event that shows the bubble popup, but put a check in to see if it already has a bubble popup. So something like this before setting the popup options and showing it: if(!jQuery("#" + id).HasBubblePopup()) jQuery("#" + id).CreateBubblePopup(options);

            People

            • Assignee:
              bsmith Brian Smith (Inactive)
              Reporter:
              garettg Garett Gowens
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: