Skip to content

Add Helper class to cache and load WinGet Native Packages #2931

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

Merged
merged 3 commits into from
Nov 3, 2024

Conversation

marticliment
Copy link
Owner

@marticliment marticliment commented Nov 3, 2024

NOTE: This is an icon-focused improvement.

Instead of loading the native packages each time they are needed in order to get the details, the icon or the installer options, cache said native package and prevent unneeded calls to the package catalog, drastically reducing CPU usage and icon loading time.

PROS:

  • Way faster loading times for details, icons and native installationOptions
  • Less CPU impact
  • More accurate installationOptions (operation type dependent)

CONS:

  • More susceptible to COM Server reset issues
  • Potential (but almost insignificant) RAM usage increase

@marticliment marticliment marked this pull request as ready for review November 3, 2024 22:28
@marticliment marticliment merged commit c879ac0 into main Nov 3, 2024
2 checks passed
@marticliment marticliment deleted the winget-native-package-caching branch November 7, 2024 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant