Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-40252

Items should have a Iterable<T> getAllItemsUnsorted(Class)

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Minor Minor
    • core

      Lots of things need to walk all the items in Jenkins but do not care the order in which they walk them... or may not even care to complete the walk once the existence of at least one matching item has been confirmed.

      Items.getAllItems(Class) currently builds the full list of items and then sorts the list by item name... repeatedly sorting as the tree is traversed.

      A Iterable<T> getAllItemsUnsorted(Class<T> clazz) implementation (or two variants: depth first vs breadth first) could avoid allocation of the interim ArrayList instances and also avoid all the sorting while using a semi-lazy iterator.

          [JENKINS-40252] Items should have a Iterable<T> getAllItemsUnsorted(Class)

          Stephen Connolly created issue -
          Jesse Glick made changes -
          Labels New: api
          Jesse Glick made changes -
          Summary Original: Items should have a {{Iterable<T> getAllItemsUnsorted(Class)}} New: Items should have a Iterable<T> getAllItemsUnsorted(Class)
          Jesse Glick made changes -
          Labels Original: api New: api performance
          Stephen Connolly made changes -
          Assignee New: Stephen Connolly [ stephenconnolly ]
          Stephen Connolly made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]
          Stephen Connolly made changes -
          Status Original: In Progress [ 3 ] New: In Review [ 10005 ]
          Oleg Nenashev made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: In Review [ 10005 ] New: Resolved [ 5 ]
          Stephen Connolly made changes -
          Status Original: Resolved [ 5 ] New: Closed [ 6 ]

            stephenconnolly Stephen Connolly
            stephenconnolly Stephen Connolly
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: