Skip to content

[Performance improvements for find/install] Fix IEnumerable issues #654

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
SydneyhSmith opened this issue May 24, 2022 · 1 comment
Closed

Comments

@SydneyhSmith
Copy link
Collaborator

SydneyhSmith commented May 24, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants