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

SAP DefaultVersionManager & CachingVersionStore Optimization

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Fixed
    • 5.1
    • None
    • 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

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

      Package: com.atlassian.jira.project.version

      Usage Scenario: The caching version store caches versions and can map version ids to versions. The DefaultVersionManager makes use of the caching version store. In our JIRA instance there are more than 20.000 versions.

      Current Implementation: For some methods the DefaultVersionManager has to iterate through all 20.000 versions and has to check for each version if a certain condition is fulfilled. Example:

      public Collection<Version> getVersionsByName(final String versionName)
      {
      ..
        final List<GenericValue> versionGvs = versionStore.getAllVersions(); ...
        CollectionUtil.foreach(versionGvs, consumer); ...
        return filteredVersions;
      }
      

      Especially in the parsing of JQL queries this method is called very often.

      One Alternative Implementation: Extend the caching by two further caches, one that gives all versions of a given project and one that gives all version of a given name (case insensitive).

      class Caches 
      {
        Map versionCache;
        Map<Long, List<Long>> versionIdsByProjectIdCache;
        Map<String, List<Long>> versionIdsByNameCache;
      }
      

      Make use of the two new caches in the methods of DefaultVersionManager wherever possible.

      Attachments

        Issue Links

          Activity

            People

              tcampbell Trevor Campbell (Inactive)
              rbal Rick
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: