Remove needless DB queries

XMLWordPrintable

      We use the JIRA web-app in our enterprise app, using a custom authenticator and user manager. We store user properties in the OSUser objects (which uses the OSUser EJB store).

      JIRA is intent on bulk loading all our properties every time it does everything, and many times per request!

      There are some things I've changed to make the performance less bad on our system (as it's rather slow to have several thousand DB hits per page request).

      First, com.atlassian.core.user.preferences.UserPreferences - the default constructor bulkloads every user with this(pUser, true); Can this be changed to this(pUser, false)? Is there ever a time when bulkloading is a good thing? Even better, can the backingPS returned be cached for the duration of the request? Things creating a new UserPreferences cause hits on the database for items that have been cached in other instances, but not in this one (i.e. can we share the result of PropertySetManager.getInstance("cached", params); for the duration of the request?).

      In com.atlassian.jira.config.properties.PropertiesManager the singleton's a step forward, but the loadPropertySet method insists on bulkloading everything - does this really have to be done?

      By changing only these two things, the DB access is cut down significantly for us.

            Assignee:
            Scott Farquhar
            Reporter:
            Chris Pearson
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: