-
Notifications
You must be signed in to change notification settings - Fork 82
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
Speed Up info_pkgs #161
base: master
Are you sure you want to change the base?
Speed Up info_pkgs #161
Conversation
Gets the quantity of folders at `$env:ChocolateyInstall\lib`, which contains the programs Chocolatey has installed.
This method can also be used for info_ps_pkgs (by enumerating over |
Unless we can figure out how to differentiate which packages were installed using PowershellGet, using |
I mean yes, not all directories of In this, only the top directory has explicitly installed modules. The below 2 are ones that are included in Windows by default, so we don't need to enumerate over them. PowerShell Core can be handled similarly. I have an implementation ready, will handle it in a separate PR. |
- Added "system" to info_pkgs as a faster alternative to "winget" - Returns the total quantity of 'uninstallable' programs - Quantity is different from what Winget returns due to the lack of its index, so this couldn't be used as a faster implementation of "winget" - Added "system" to default config file - Changed the returned string in "winget" to clarify that it is Winget and not the entire system
Just a heads up: Apps installed by winget will show up as both |
While usually I would agree, I think this could be an exception as this method cannot replace the implementation for Winget because of its lack of an index and UWP apps but is significantly faster than the Winget method. |
- Missed two registry paths for 64-bit programs - Somehow tanking the errors is slightly faster than checking if $program had a value
|
Speeds up the retrieval of packages
Speed up Chocolatey
$env:ChocolateyInstall\lib
, which contains the programs Chocolatey has installed.Speed up Winget
Maybe use the repo's REST API?C:\Program Files\WindowsApps\Microsoft.Winget.Source_*.*.*.*_neutral__*\Public\index.db
Is the location of Winget's indexImport-Module PSSQLite
Invoke-SqliteQuery -DataSource "Location\of\winget\DB" -Query "SELECT * FROM NAMES"
PackageManager.FindProvisionedPackages()
NonAdmin:
PackageManager.FindPackagesForUserWithPackageTypes({}, PackageTypes::Main)
Add-Type
code compilingNonAdmin: HKCU
"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall"
Added "system" to info_pkgs as a faster alternative to "winget"
(winget)
instead of(system)
to clarify that it is Winget and not the entire system