Uploaded image for project: 'Jira Cloud'
  1. Jira Cloud
  2. JRACLOUD-27993

SAP DefaultVersionManager & CachingVersionStore Optimization

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Fixed
    • None
    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

    Description

      NOTE: This suggestion is for JIRA Cloud. Using JIRA Server? 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: