The Space Directory page loads slowly when there are many team labels (space categories).

XMLWordPrintable

    • 1
    • Severity 3 - Minor

      Issue Summary

      Space Directory page takes really long time to load in scenarios when we have large number of team labels(space categories) configured under Confluence instance. In case the number of team labels are more than 4-5K, there is a possibility that the space directory page load time might exceeds the default 60 secs timeout of proxy and appears to fail altogether. 

      Steps to Reproduce

      1. Install Confluence version 10.2.13 or lower. 
      2. Load large number of spaces(more than 5K) along with different categories/team labels.
      3. Now login as an admin or non admin user.
      4. Visit the Space directory page. 

      Expected Results

      Space directory page loads fine without any issues for both admin and non admin users.

      Actual Results

      • It takes a really long time for the request to complete. In some scenario's, it may take more than a min and this request will be logged under stuck threads. 
      • We can see large number of below query being triggered in the SQL logs time and again which are dependent on different number of space categories configured.
      2026-05-13 11:27:44,870 DEBUG [http-nio-8090-exec-14 url: /confluence/spacedirectory/view.action; user: test] [org.hibernate.SQL] logStatement select distinct space1_.SPACEID as spaceid1_73_, space1_.SPACENAME as spacenam2_73_, space1_.SPACEKEY as spacekey3_73_, space1_.LOWERSPACEKEY as lowerspa4_73_, space1_.SPACEDESCID as spacedes5_73_, space1_.HOMEPAGE as homepage6_73_, space1_.CREATOR as creator7_73_, space1_.CREATIONDATE as creation8_73_, space1_.LASTMODIFIER as lastmodi9_73_, space1_.LASTMODDATE as lastmod10_73_, space1_.SPACETYPE as spacety11_73_, space1_.SPACESTATUS as spacest12_73_ from SPACEPERMISSIONS spacepermi0_ inner join SPACES space1_ on spacepermi0_.SPACEID=space1_.SPACEID where (spacepermi0_.PERMUSERNAME=? or spacepermi0_.PERMGROUPNAME in (?) or spacepermi0_.PERMALLUSERSSUBJECT='authenticated-users' or (spacepermi0_.PERMUSERNAME is null) and (spacepermi0_.PERMGROUPNAME is null) and (spacepermi0_.PERMALLUSERSSUBJECT is null)) and spacepermi0_.PERMTYPE=? and (space1_.SPACEDESCID in (select labelling2_.CONTENTID from CONTENT_LABEL labelling2_ cross join LABEL label3_ cross join CONTENT contentent4_ where labelling2_.CONTENTID=contentent4_.CONTENTID and labelling2_.LABELID=label3_.LABELID and (label3_.LABELID in (?)))) order by space1_.SPACENAME, space1_.SPACEKEY limit ? 
      
      

      Workaround

      Currently there is no known workaround for this behavior. A workaround will be added here when available

              Assignee:
              Mahesh Swami
              Reporter:
              Saurabh Bhatia
              Votes:
              2 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated: