-
Notifications
You must be signed in to change notification settings - Fork 28k
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
Fix perf issue for InstallAnotherVersionAction #136992
Fix perf issue for InstallAnotherVersionAction #136992
Conversation
return result; | ||
const seenVersions = new Set<string>(); | ||
// Run checks in parallel to reduce wait time (fixes slow performance related to extensions with ownership changes) | ||
const result = await Promise.all( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about use p-map for control concurrently?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@axetroy I'm a new contributor to vscode. What's vscode's policy on adding more npm packages? I'd be happy to add this if it's a normal thing to do, as that does look like a nice package that will help manage the number of "concurrent" threads.
@sandy081 is there anything I can do to help keep this moving? |
I will take a look at it and get back to you. Thanks. |
This PR fixes #140525
There's a significant performance issue with the "Install another version" dropdown in the extensions panel, but it only affects extensions that have undergone an ownership change. For example, this extension that I maintain used to be published under the publisher name "celsoaf", but is now published under the publisher name "rokucommunity". (I worked with vsmarketplace team to migrate the extension to a new publisher name without losing all our stats and information).
The issue is caused by certain artifacts on the server no longer existing (or using the wrong URLs, not sure which), resulting in very slow (300-500ms) 403 and 404 http responses from the server. This drastically slows down the process of gathering all version information since that process is run sequentially here. Ideally the vsmarketplace team could speed up their 403 and 404 error response times or include additional version metadata so vscode doesn't need to run an HTTP query for every version. However, I have created a fix that seems to work around the issue.
To mitigate the performance issues, rather than running the queries one at a time, we instead run them all at the same time. Consider the results:
Before my fix: 57 seconds
After my fix: 1 second