Closed
Description
Summary of the new feature / enhancement
Misuse of IEnumerable is causing multiple server hits in 'Find'.
- LINQ is generics and can cause multiple compiled methods calling search APIs.
- Find code always returned IEnumerable interface, causing LINQ calls to call
search APIs multiple times to manipulate IEnumerable as collections. - Dependency search returns IEnumerable which is then used as collection and calls server X times.
retrievedPkgs = pkgMetadataResource.GetMetadataAsync(...)
if (retrievedPkgs == null || retrievedPkgs.Count() == 0) ...
foundPackagesMetadata.AddRange(retrievedPkgs.ToList());
Proposed technical implementation details (optional)
No response