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

Performance of CredentialsProvider#lookupCredentials

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • credentials-plugin
    • None
    • credentials 2.3.16

      CredentialsProvider#lookupCredentials does a sort by name (#42) in order to display credentials in dropdowns listed by name.

      This causes a full scan of credentials even when calling something like CredentialsProvider#findCredentialById that is supposed to return a single credentials object.

      When the CredentialsProvider implementation depends on a remote system, this causes a lookup of all credentials name, even when it is being used to look up a single one (when using the withCredentials step for example). This can be mitigated by implementing a cache, however it is still really inefficient because that sort shouldn't even happen.

      This sorting should rather happen only in methods that are building ListBoxModel.

            vlatombe Vincent Latombe
            vlatombe Vincent Latombe
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: