Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-68149

Loading of batch.js and batch.css is slow making page load time longer in JIRA

XMLWordPrintable

      Summary

      Jira page-load-times are taking more time than usual.
      Specifically, the files batch.js and batch.css take much longer time to load, sometimes in the range of 10s of seconds.
      The issue is reproducible on all browsers.

      Environment

      • Jira 7.10.x, 7.11.x, or 7.12.x
      • Jira runs under load, many concurrent users 100+ concurrent users.

      Steps to Reproduce

      1. On a loaded Jira instance, try to load any page, eg: Issue navigator.

      Expected Results,

      The page should load in a reasonable time.

      • Issue navigator on jira.atlassian.com load in around 3 seconds.
      • Resources are cached at the Jira side and not recompiled

      Actual Results

      • The page takes much longer time to load.
      • Some resources are not cached at the Jira side and recompiled on every page view
      • Taking thread dumps we see multiple user threads running the below Mozilla Rhino compiler code for Javascript and CSS resources:
        "http-nio-8080-exec-1814" #172656 daemon prio=5 tid=0x00007f7d8c2c7000 nid=0x6615 runnable [0x00007f7cf2472000]
           java.lang.Thread.State: RUNNABLE
                at org.mozilla.javascript.ScriptableObject.createSlot(ScriptableObject.java:2836)
                - locked <0x00000007bc210c88> (a org.mozilla.javascript.NativeCall)
                at org.mozilla.javascript.ScriptableObject.getSlot(ScriptableObject.java:2756)
                at org.mozilla.javascript.ScriptableObject.putImpl(ScriptableObject.java:2640)
        --
        "http-nio-8080-exec-1812" #172655 daemon prio=5 tid=0x00007f7d8c10c800 nid=0x6614 runnable [0x00007f7cf65c8000]
           java.lang.Thread.State: RUNNABLE
                at org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:42)
                at org.mozilla.javascript.gen._js_less_less_rhino_js_1._c_anonymous_205(/js/less/less-rhino.js:3196)
                at org.mozilla.javascript.gen._js_less_less_rhino_js_1.call(/js/less/less-rhino.js)
                at org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:32)
        --
        "http-nio-8080-exec-1809" #172636 daemon prio=5 tid=0x00007f7d8063d800 nid=0x65ab runnable [0x00007f7d244cf000]
           java.lang.Thread.State: RUNNABLE
                at org.mozilla.javascript.BaseFunction.createObject(BaseFunction.java:383)
                at org.mozilla.javascript.BaseFunction.construct(BaseFunction.java:339)
                at org.mozilla.javascript.ScriptRuntime.newObject(ScriptRuntime.java:2348)
                at org.mozilla.javascript.gen._js_less_less_rhino_js_1._c_anonymous_80(/js/less/less-rhino.js:1691)
        

      No errors are noticed in the logs.

      Notes

      • In Jira version 7.10.0, a piece of logic was introduced to a file that lists resources to import on some pages, e.g. on the backlog view.
      • Due to the added logic, the file became dynamic, and thus Jira is unable to cache this file or any of the imported resources.
      • As a result, Jira needs to recompile some LESS files on every page view. This operation is CPU intensive and can create a performance bottleneck.
      • The piece of logic was added in Jira 7.10.0 and was removed in Jira 7.13.0.

      Workaround

      Please upgrade Jira to version 7.13.0 or newer to receive the fix. Unfortunately, there are no known workarounds for the problem.

        1. Screenshot_20181005_153609.png
          143 kB
          Sherif Abdelfattah

              Unassigned Unassigned
              sabdelfattah Sherif Abdelfattah (Inactive)
              Votes:
              14 Vote for this issue
              Watchers:
              62 Start watching this issue

                Created:
                Updated:
                Resolved: