Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-14406

Improve performance of Ajax User Picker

    XMLWordPrintable

Details

    • We collect Jira feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

    Description

      http://confluence.atlassian.com/display/JIRA/JIRA+3.10+Release+Notes#JIRA3.10ReleaseNotes-ajax

      We are really excited by Ajax User Picker and want to use it in our environment.
      But the problem is that we have more than 5K of users ( infact more than 50K ).

      Current implementation of Ajax "User Picker" is very CPU greedy, because it does simple sequential scan ( without any index access ) of all jira users.

      Here's the code:
      com.atlassian.jira.bc.user.search.DefaultUserPickerSearchService

      final Collection users = getAllUsers();
      for (Iterator iterator = users.iterator(); iterator.hasNext();) {
          final User user = (User) iterator.next();
          if (userMatches(user, query, canShowEmailAddresses)) {
              returnUsers.add(user);
          }
      }
      

      It makes sense to improve performance of such operation by utilizing either

      • Lucene index + Prefix query
      • Database index on id / firstname / lastname

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              fdcad400eb61 Alexey Alexey
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: