Uploaded image for project: 'Ivy'
  1. Ivy
  2. IVY-1465

ModuleRules.getRule is O(n) leading to resolution slowness

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.3.0
    • Fix Version/s: 2.4.0
    • Component/s: Core
    • Labels:
    • Environment:

      OpenJDK 6,7, MacOSX + Ubuntu

      Description

      So, for the sbt project we noticed significant resolution time improvements with the following patch:

      https://github.com/sbt/ivy/pull/1

      The reasoning:

      A lot of artifacts being resolved use Maven's "dependencyManagement" conventions
      Ivy appears to turn these into "exact matcher" rules
      A ton of resolution time is spent filtering through these rules
      The existing solution is O for all overrides

      What the patch does:

      Creates a key'd store for all "exact matcher" rules
      When executing rules, ensure that we only traverse what we have to (non-exact, exact specific to our key and "default").

      As I said, this represents a significant speed bump for sbt builds using Ivy. All existing tests pass, and I think they cover this aspect of ivy pretty well, from what I could see.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                jsuereth Joshua Suereth
              • Votes:
                2 Vote for this issue
                Watchers:
                9 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: