Hibernate queries much slower with FlushMode.AUTO

XMLWordPrintable

    • Type: Suggestion
    • Resolution: Won't Do
    • None
    • Component/s: None

      NOTE: This suggestion is for Confluence Server. Using Confluence Cloud? See the corresponding suggestion.

      When opening dashboard, the methods below slow down in our customer environment.

      • LabelManager.getLabel()
      • SpaceManager.getPersonalSpace()

      Just after rebooting, it takes 10-20ms to process each methods, but, after a while, it takes around 100ms.

      We survey this issue and find that this phenomenon could be due to flushEntity of Hibernate.

      They display Favorite spaces on their dashboard.
      We confirmed that the value of flushEntity could be changed depending on the order which sort space table by spacename, spacekey and appear at interval of 500, during that process.
      The result of the following SQL seems to be the flush.

      select space0_.SPACEID as SPACEID, space0_.SPACENAME as SPACENAME, space0_.SPACEKEY as SPACEKEY, space0_.SPACEDESCID as SPACEDES4_, space0_.HOMEPAGE as HOMEPAGE, space0_.CREATOR as CREATOR, space0_.CREATIONDATE as CREATION7_, space0_.LASTMODIFIER as LASTMODI8_, space0_.LASTMODDATE as LASTMODD9_, space0_.SPACETYPE as SPACETYPE, space0_.SPACESTATUS as SPACEST11_, space0_.SPACEGROUPID as SPACEGR12_ from SPACES space0_ order by space0_.SPACENAME , space0_.SPACEKEY limit 2000, 500;
      

      In our customer's dashboard, it took 330ms(30ms x 11) to process this flushEntity and Peformance regression seemed to be occurred by slowing due to memory state.

      This issue is similar to the following problem of Hibernate.

            Assignee:
            Unassigned
            Reporter:
            Ricksoft Co., Ltd.
            Votes:
            3 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: