Inedo / pgscan

Dependency scanner for ProGet.
MIT License
11 stars 5 forks source link

Use HashSet to aggregate packages and API calls. #5

Closed szimmer-dap closed 2 years ago

szimmer-dap commented 2 years ago

Aggregate API calls by collection package info in a HashSet before publishing them.

Larger solutions might have multiple projects with the same packages. When the consumerName is given (i.e. not read from each project individually), the dependency package ./. consumer package info is the same for the same packages and does not need to be sent to the API several times. This speeds up the process.

Changes in this pull request:

  1. Add GetHashCode() and Equals() methods to DependencyPackage so it can be used in a HashSet.
  2. Collect packages in HashSet an then iterate over HashSet.
gdivis commented 2 years ago

Thanks! We are planning to also update the server-side API to allow batches of data to be published at once; that should also help a lot.