Performance in Jira front-end: the story of a single line of code
Nov 17, 2020Alexey Shpakov

Summary
This post details the process of identifying and fixing an inefficiency in Jira Cloud's frontend bundle sizes. The investigation involved using Chrome DevTools and webpack-bundle-analyzer to pinpoint large JavaScript assets. The root cause was identified as the `url-loader` configuration in Webpack, which was inlining images up to 10KB into critical JS bundles. The fix involved adjusting the `limit` option for `url-loader` to a much lower threshold (ideally only inlining SVGs) or disabling it entirely. This change is expected to reduce bundle sizes and improve page load performance by preventing the download, parsing, and execution of unnecessary inlined image assets, which also compress poorly with Gzip/Brotli.