The Jira project list page is very slow to load due to heavy javascript code from 3rd party add-ons

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the server and data center platforms.

    

Summary

This knowledge base article describes an example of scenario where the project list page accessed from Top Bar > Projects > View All Projects takes a very long time to load (for example > 20s).

Environment

Jira 8.0.0 and above.

Diagnosis

  • When loading the Project list page while having the Network tab from the Browser Developer tool opened, we can see that one of the HTTP request which is loading a batch.js file takes a very long time to load (10-20 seconds), due to the big size of the file (several MBs):

    • In the example above, the batch.js file is loaded from the URL below:

      <JIRA_BASE_URL>/s/22d45bff8cc836be8af08b14cca9fc40-CDN/-mpclfi/820006/1euwt2n/913723dad1470421bc02be0a8af8f765/_/download/contextbatch/js/atl.admin,jira.global,jara.admin,-_super/batch.js?agile_global_admin_condition=true&healthcheck-true =true&locale=zh-CN&whisper-enabled=true
  • When running on a fresh vanilla Jira instance without any 3rd party add-on installed, or when entering plugin safe mode, we can see that the same file batch.js loads much faster (a few milliseconds) thanks to its very small size (a few KBs):
  • Download the content of the problematic batch.js file as a temporary file on your local machine, which is possible by:
    • either collecting a HAR file using the browser development tool
    • or by clicking on the HTTP request from the Network tab and then clicking on the Response tab and saving its content to a text file:
    • Check the content of the local batch.js file and look for any javascript code coming from module keys that are not from Atlassian (basically, any code located below a module-key which does not start with the string com.atlassian:

      • For example, any key starting with the below string is coming from the ScriptRunner add-on:

        /* module-key = 'com.onresolve.jira.groovy.groovyrunner ...
      • For example, any key starting with the below string is coming from the OrgWise-Organization and Report for Jira add-on:

        /* module-key = 'com.shdsd.plugin.organizationPro ...
    • Try to delete the scripts coming from these add-on keys, save the local file batch.js, and check if the size of the file decreased drastically. If that's the case, then it is an indication that the add-ons from which you deleted the scripts were the ones contributing to the big size of the batch.js file, and consequently the slow loading of the project list page
    • Alternatively, you can also confirm that the page loads faster, or that the size of batch.js file is smaller by either entering plugin safe mode, or disabling the add-ons identified in that file

Cause

The Jira application merges and compresses all the javascript code coming from both the native Jira application and all the 3rd party add-ons installed on top of it, and puts them in the batch.js file. This file is loaded and all the javascript code from it is executed by the browser to render any Jira page that you are trying to access. If any 3rd party add-on contains MBs worth of javascript code, the size of the batch.js file will increase, and depending on the speed of the network, this file might taker long time to load, slowing down the loading of some Jira pages.

Solution

Once you have identified the 3rd party add-ons which javascript code is contributing the most to the size of the batch.js file, you might consider either:

  • simplifying the code configured with these add-ons
  • or reaching out to the support teams responsible for these add-ons, since 3rd party add-ons fall outside of Atlassian support


Last modified on Apr 19, 2022

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.