MissingLocalArtifactMetadataTest.groovy

Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
De-duplicate (= intern) some instances in dependency resolution

- Reduce memory usage of dependency resolution by de-duplicating the

most commonly used immutable instances.

- Objects aren't strictly immutable: displayName is calculated lazily

- solution is thread-safe without synchronization

- lazy calculation is needed for efficient interning since a lookup

will always create a new instance.

- Use strong references in some instance interners

- strong references cause less GC overhead than weak references

- Strong references:

DefaultModuleIdentifier

DefaultModuleVersionIdentifier

DefaultModuleVersionSelector

DefaultModuleComponentIdentifier

DefaultModuleComponentSelector

DefaultProjectComponentSelector

- Weak references:

DefaultLibraryBinaryIdentifier

DefaultLibraryComponentSelector

DefaultIvyArtifactName

- Both reference types:

DefaultBuildIdentifier

DefaultProjectComponentIdentifier

- The reason for special handing is that DefaultBuildIdentifier

has a state field "current" as part of the instance which

isn't part of equals/hashCode.

+review REVIEW-6277

    • -2
    • +2
    ./MissingLocalArtifactMetadataTest.groovy
  1. … 104 more files in changeset.
Rename `o.g.i.c.model.*{MetaData => Metadata}`

    • -0
    • +75
    ./MissingLocalArtifactMetadataTest.groovy
  1. … 162 more files in changeset.