{"id":570,"date":"2020-09-30T11:05:54","date_gmt":"2020-09-30T08:05:54","guid":{"rendered":"https:\/\/www.drinkits.lv\/?p=570"},"modified":"2020-11-23T11:40:11","modified_gmt":"2020-11-23T09:40:11","slug":"favourite-filters-issue-count-performance-problems-in-large-instances","status":"publish","type":"post","link":"https:\/\/www.drinkits.lv\/en\/2020\/09\/30\/favourite-filters-issue-count-performance-problems-in-large-instances\/","title":{"rendered":"Favourite Filters Issue Count Performance problems in large instances (Jira)"},"content":{"rendered":"<p>As described in <a href=\"https:\/\/jira.atlassian.com\/browse\/JRASERVER-43040\">this Atlassian ticket<\/a> there may be performance problems using Favourite Filters gadget in large Jira instances.<\/p>\n<div>\n<p>In our Jira instance (&gt;2m issues, &gt;10k users) these <em>favfilters?showCounts=true <\/em>requests where very expensive to CPU load.<\/p>\n<\/div>\n<p><a href=\"https:\/\/www.drinkits.lv\/wp-content\/uploads\/2020\/09\/requests.png\" data-lbwps-width=\"1819\" data-lbwps-height=\"129\" data-lbwps-srcsmall=\"https:\/\/www.drinkits.lv\/wp-content\/uploads\/2020\/09\/requests.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-588\" src=\"https:\/\/www.drinkits.lv\/wp-content\/uploads\/2020\/09\/requests.png\" alt=\"\" width=\"1819\" height=\"129\" srcset=\"https:\/\/www.drinkits.lv\/wp-content\/uploads\/2020\/09\/requests.png 1819w, https:\/\/www.drinkits.lv\/wp-content\/uploads\/2020\/09\/requests-300x21.png 300w, https:\/\/www.drinkits.lv\/wp-content\/uploads\/2020\/09\/requests-768x54.png 768w, https:\/\/www.drinkits.lv\/wp-content\/uploads\/2020\/09\/requests-1536x109.png 1536w, https:\/\/www.drinkits.lv\/wp-content\/uploads\/2020\/09\/requests-766x54.png 766w\" sizes=\"auto, (max-width: 1819px) 100vw, 1819px\" \/><\/a><\/p>\n<p>In Atlassian ticket there is workaround provided how to turn off this feature in proxy level, but what to do if no proxy is used in front of Jira?<\/p>\n<p>In our case we used <a href=\"https:\/\/www.tuckey.org\/urlrewrite\/\">Tuckey UrlRewriteFilter<\/a> which is built in Jira by default. Open <em>\/jira_install_dir\/atlassian-jira\/WEB-INF\/urlrewrite.xml <\/em>and add this code before closing <em>&lt;\/urlrewrite&gt;<\/em> tag:<\/p>\n<div>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">&lt;rule enabled=\"true\"&gt;\r\n    &lt;name&gt;Disables Favourite Filters Issue Count&lt;\/name&gt;\r\n    &lt;condition type=\"parameter\" name=\"showCounts\" operator=\"equal\"&gt;true&lt;\/condition&gt;\r\n    &lt;from&gt;^\/rest\/gadget\/1.0\/favfilters&lt;\/from&gt;\r\n    &lt;to type=\"permanent-redirect\"&gt;\/rest\/gadget\/1.0\/favfilters?showCounts=false&lt;\/to&gt;\r\n&lt;\/rule&gt;<\/pre>\n<p><a href=\"https:\/\/www.drinkits.lv\/wp-content\/uploads\/2020\/09\/undefined.png\" data-lbwps-width=\"611\" data-lbwps-height=\"184\" data-lbwps-srcsmall=\"https:\/\/www.drinkits.lv\/wp-content\/uploads\/2020\/09\/undefined.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignright wp-image-575 size-medium\" src=\"https:\/\/www.drinkits.lv\/wp-content\/uploads\/2020\/09\/undefined-300x90.png\" alt=\"\" width=\"300\" height=\"90\" srcset=\"https:\/\/www.drinkits.lv\/wp-content\/uploads\/2020\/09\/undefined-300x90.png 300w, https:\/\/www.drinkits.lv\/wp-content\/uploads\/2020\/09\/undefined.png 611w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a>After Jira restart users will see &#8220;UNDEFINED&#8221; result if they turn on Issue Count functionality.<\/p>\n<\/div>","protected":false},"excerpt":{"rendered":"<a href=\"https:\/\/www.drinkits.lv\/en\/2020\/09\/30\/favourite-filters-issue-count-performance-problems-in-large-instances\/\" rel=\"bookmark\" title=\"Permalink to Favourite Filters Issue Count Performance problems in large instances (Jira)\"><p>As described in this Atlassian ticket there may be performance problems using Favourite Filters gadget in large Jira instances. In our Jira instance (&gt;2m issues, &gt;10k users) these favfilters?showCounts=true requests where very expensive to CPU load. In Atlassian ticket there is workaround provided how to turn off this feature in proxy level, but what to [&hellip;]<\/p>\n<\/a>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[7,8],"tags":[47,90,112,114,113],"class_list":{"0":"post-570","1":"post","2":"type-post","3":"status-publish","4":"format-standard","6":"category-noderigi","7":"category-skripti","8":"tag-jira","9":"tag-script","10":"tag-tuckey","11":"tag-urlrewrite-xml","12":"tag-urlrewritefilter","13":"h-entry","14":"hentry"},"_links":{"self":[{"href":"https:\/\/www.drinkits.lv\/en\/wp-json\/wp\/v2\/posts\/570","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.drinkits.lv\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.drinkits.lv\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.drinkits.lv\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.drinkits.lv\/en\/wp-json\/wp\/v2\/comments?post=570"}],"version-history":[{"count":14,"href":"https:\/\/www.drinkits.lv\/en\/wp-json\/wp\/v2\/posts\/570\/revisions"}],"predecessor-version":[{"id":592,"href":"https:\/\/www.drinkits.lv\/en\/wp-json\/wp\/v2\/posts\/570\/revisions\/592"}],"wp:attachment":[{"href":"https:\/\/www.drinkits.lv\/en\/wp-json\/wp\/v2\/media?parent=570"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.drinkits.lv\/en\/wp-json\/wp\/v2\/categories?post=570"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.drinkits.lv\/en\/wp-json\/wp\/v2\/tags?post=570"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}