8000 Degraded performance after upgrading to version Chocolatey CLI v2.0.0 · Issue #3183 · chocolatey/choco · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Degraded performance after upgrading to version Chocolatey CLI v2.0.0 #3183

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
4 tasks done
mwallner opened this issue Jun 1, 2023 · 9 comments · Fixed by #3195
Closed
4 tasks done

Degraded performance after upgrading to version Chocolatey CLI v2.0.0 #3183

mwallner opened this issue Jun 1, 2023 · 9 comments · Fixed by #3195

Comments

@mwallner
Copy link
Member
mwallner commented Jun 1, 2023

Checklist

  • I have verified this is the correct repository for opening this issue.
  • I have verified no other issues exist related to my problem. (~ kind of - see choco outdated slow with many packages and feeds #2165 )
  • I have verified this is not an issue for a specific package.
  • I have verified this issue is not security related.

What You Are Seeing?

After upgrading Chocolatey to version 2.0 it is considerably slower when doing outdated or upgrade all -noop.

=> choco 1.4 vs. choco 2.0
=> 4 sources configured, 20 packages installed.
=> choco 1.4 ~ 3 sec.
=> choco 2.0 ~ 97 sec.

Additional note: feeds are ProGet hosted, NuGet v2 feeds, LAN-type 1GBit-connection between demo host and Server, firewalls disabled during test.

image

What is Expected?

Performance should not be worse in the new version.

How Did You Get This To Happen?

I ran choco outdated on a demo system, with chocolatey 1.4 and chocolatey 2.0

System Details

  • Operating System: Windows 1809 LTSC
  • Windows PowerShell version: 5.1
  • Chocolatey CLI Version: 2.0
  • Chocolatey License type: OSS / Free
  • Terminal/Emulator: Windows PowerShell

Installed Packages

Chocolatey v2.0.0
7zip.install 19.0.0.20210614
7zip.install.bin 19.0.0
7zip-zstd.plugin 1.4.92.20210614
*
*
chocolatey 2.0.0
chocolatey-core.extension 1.3.5.1
CredentialManager 2.0.0
dotnet-version-detector 22.2.0
*
*
*
*
*
openssh 8.0.0.1
PowerShell 5.1.14409.20190918
procexp 16.42.0
psake 4.9.0
rocolatey 0.6.1
vcredist140 14.0.24215.1
20 packages installed.

Output Log

PS C:\Windows\system32> Measure-Command { choco outdated }


Days              : 0
Hours             : 0
Minutes           : 1
Seconds           : 37
Milliseconds      : 140
Ticks             : 971405841
TotalDays         : 0,00112431231597222
TotalHours        : 0,0269834955833333
TotalMinutes      : 1,619009735
TotalSeconds      : 97,1405841
TotalMilliseconds : 97140,5841

Additional Context

No response

@mwallner mwallner added the Bug label Jun 1, 2023
@davidenco
Copy link
davidenco commented Jun 1, 2023

Same here:

Chocolatey v2.0.0
7zip 22.1.0
7zip.install 22.1.0
choco-cleaner 1.0.0
chocolatey 2.0.0
chocolatey-compatibility.extension 1.0.0
chocolatey-core.extension 1.4.0
chocolatey-dotnetfx.extension 1.0.1
chocolatey-windowsupdate.extension 1.0.5
choco-upgrade-all-at-startup 2023.5.10
dotnet 7.0.5
dotnet-6.0-runtime 6.0.16
dotnet-7.0-runtime 7.0.5
dotnet-runtime 7.0.5
ffmpeg 6.0.0
jre8 8.0.371
KB2919355 1.0.20160915
KB2919442 1.0.20160915
KB2999226 1.0.20181019
KB3033929 1.0.5
KB3035131 1.0.3
KB3063858 1.0.0
KB3118401 1.0.5
netfx-4.7.2 4.7.2
powershell-core 7.3.4
vcredist140 14.36.32532
vcredist2005 8.0.50727.619501
vcredist2008 9.0.30729.616104
vcredist2010 10.0.40219.32503
vcredist2012 11.0.61031.20230518
vcredist2013 12.0.40660.20180427
vcredist2015 14.0.24215.20170201
vcredist2017 14.16.27033
vcredist-all 1.0.1
winrar 6.21.0
wintail 2002.7.0
35 packages installed.
> Measure-Command { choco outdated }


Days              : 0
Hours             : 0
Minutes           : 0
Seconds           : 48
Milliseconds      : 691
Ticks             : 486913485
TotalDays         : 0.000563557274305555
TotalHours        : 0.0135253745833333
TotalMinutes      : 0.811522475
TotalSeconds      : 48.6913485
TotalMilliseconds : 48691.3485

@mwallner mwallner changed the title massive performance degration after upgrading to version 2.0 performance degration after upgrading to version 2.0 Jun 1, 2023
@pauby
Copy link
Member
pauby commented Jun 1, 2023

While this may not help with the problem, I hope it highlights:

  1. We are aware of this.
  2. We want you to help us fix this.

So be prepared for technical questions as we look at this more and more.

@pauby
Copy link
Member
pauby commented Jun 2, 2023

We have found an area where we can improve the optimization of this and will be looking to release a pre-release version shortly for testing. I will update this issue when it happens so if you want to be notified, please subscribe to this issue.

@gep13
Copy link
Member
gep13 commented Jun 5, 2023

Having done some investigation on this issue, the problem stems from this issue within the Chocolatey.NuGet.Client assemblies. That issue will need to be addressed, and a new version of the Chocolatey.NuGet.Client assemblies brought into Chocolatey CLI to correct this problem.

A PR will be raised, and the necessary changes made to Chocolatey CLI once a new version is released.

gep13 added a commit to gep13/choco that referenced this issue Jun 5, 2023
In order to prevent a 1 second delay being imposed on each outgoing
query, we need to make sure that an instance of a
ChocolateySourceCacheContext is passed into every method that is called
within the Chocolatey.NuGet.Client libraries. In order for this to work
changes were needed to be made in the Chocolatey.NuGet.Client libraries
to provide the overrides for all of these methods.

This commit addresses issues that were reported with the 2.0.0 release
of Chocolatey CLI, where performance of commands was significantly
slower than on v1.4.0.
gep13 added a commit to gep13/choco that referenced this issue Jun 5, 2023
In order to prevent a 1 second delay being imposed on each outgoing
query, we need to make sure that an instance of a
ChocolateySourceCacheContext is passed into every method that is called
within the Chocolatey.NuGet.Client libraries. In order for this to work
changes were needed to be made in the Chocolatey.NuGet.Client libraries
to provide the overrides for all of these methods.

This commit addresses issues that were reported with the 2.0.0 release
of Chocolatey CLI, where performance of commands was significantly
slower than on v1.4.0.
gep13 added a commit to gep13/choco that referenced this issue Jun 5, 2023
In order to prevent a 1 second delay being imposed on each outgoing
query, we need to make sure that an instance of a
ChocolateySourceCacheContext is passed into every method that is called
within the Chocolatey.NuGet.Client libraries. In order for this to work
changes were needed to be made in the Chocolatey.NuGet.Client libraries
to provide the overrides for all of these methods.

This commit addresses issues that were reported with the 2.0.0 release
of Chocolatey CLI, where performance of commands was significantly
slower than on v1.4.0.
@IFireflyl
Copy link

@gep13, thank you for the update. Out of curiosity, is there an ETA for this fix to be implemented and made available for everyone? Are we looking at a few days or weeks? Or will it possibly take a month or more?

gep13 added a commit to gep13/choco that referenced this issue Jun 5, 2023
In order to prevent a 1 second delay being imposed on each outgoing
query, we need to make sure that an instance of a
ChocolateySourceCacheContext is passed into every method that is called
within the Chocolatey.NuGet.Client libraries. In order for this to work
changes were needed to be made in the Chocolatey.NuGet.Client libraries
to provide the overrides for all of these methods.

This commit addresses issues that were reported with the 2.0.0 release
of Chocolatey CLI, where performance of commands was significantly
slower than on v1.4.0.
gep13 added a commit to gep13/choco that referenced this issue Jun 5, 2023
In order to prevent a 1 second delay being imposed on each outgoing
query, we need to make sure that an instance of a
ChocolateySourceCacheContext is passed into every method that is called
within the Chocolatey.NuGet.Client libraries. In order for this to work
changes were needed to be made in the Chocolatey.NuGet.Client libraries
to provide the overrides for all of these methods.

This commit addresses issues that were reported with the 2.0.0 release
of Chocolatey CLI, where performance of commands was significantly
slower than on v1.4.0.
gep13 added a commit to gep13/choco that referenced this issue Jun 5, 2023
In order to prevent a 1 second delay being imposed on each outgoing
query, we need to make sure that an instance of a
ChocolateySourceCacheContext is passed into every method that is called
within the Chocolatey.NuGet.Client libraries. In order for this to work
changes were needed to be made in the Chocolatey.NuGet.Client libraries
to provide the overrides for all of these methods.

This commit addresses issues that were reported with the 2.0.0 release
of Chocolatey CLI, where performance of commands was significantly
slower than on v1.4.0.
@pauby
Copy link
Member
pauby commented Jun 5, 2023

@IFireflyl There will be a pre-release in the next couple of days for this. We will update this issue when that happens.

AdmiringWorm added a commit that referenced this issue Jun 5, 2023
(#3183 #3125) Fix performance issues with outbound HTTP queries
@gep13 gep13 added 4 - Done and removed 3 - Review labels Jun 5, 2023
@gep13 gep13 changed the title performance degration after upgrading to version 2.0 Performance degration after upgrading to version 2.0 Jun 6, 2023
@gep13 gep13 changed the title Performance degration after upgrading to version 2.0 Performance degradation after upgrading to version 2.0.0 Jun 6, 2023
@nba1992
Copy link
nba1992 commented Jun 6, 2023

if can help, checking the chocolatey GUI logs, we can find:

i know the app is in Portuguese, but the log is in english.
"HttpRetryHandler is in a state .. abandoned..."
image

@chocolatey chocolatey locked as resolved and limited conversation to collaborators Jun 6, 2023
@gep13 gep13 changed the title Performance degradation after upgrading to version 2.0.0 Performance degradation after upgrading to version Chocolatey CLI v2.0.0 Jun 7, 2023
@gep13
Copy link
Member
gep13 commented Jun 9, 2023

A new version of Chocolatey CLI (v2.1.0-alpha-20230608) has been released which aims to address this issue. You can find the release notes here:

https://docs.chocolatey.org/en-us/choco/release-notes#alpha-20230608-june-8-2023

And the package here:

https://community.chocolatey.org/packages/chocolatey/2.1.0-alpha-20230608

You should be able to upgrade to this package version using:

choco upgrade chocolatey --pre

If you could take this for a spin, and verify that the issue is now resolved, that would be very helpful.

@gep13 gep13 changed the title Performance degradation after upgrading to version Chocolatey CLI v2.0.0 Degraded performance after upgrading to version Chocolatey CLI v2.0.0 Jun 28, 2023
@choco-bot
Copy link

🎉 This issue has been resolved in version 2.1.0 🎉

The release is available on:

Your GitReleaseManager bot 📦🚀

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

Successfully merging a pull request may close this issue.

7 participants
0