Home: Reduce UI refreshes in install and update tabs of Package Manager UI

Created on 15 Feb 2018  路  15Comments  路  Source: NuGet/Home

The Manage NuGet Packages for in Visual Studio is refreshing _far too much_. it feels like it's based on too many window-like events.

It would be really nice if the UI only _automatically_ refreshes when:

  • The UI is first opened.
  • A tab is selected
  • The package source is changed (new item in drop down is selected)
  • Include Pre-Release is toggled on or off
  • The refresh button is clicked.

image

Currently, if I happen two switch to a new open file, then return .. the entire refresh kicks off again. If I happen to click F5, a refresh happens again.

It's refreshing under too many non-related events.

So would love it if this could be reviewed.

My System:

  • Visual Studio 15.5.5
  • Projects: "Old" .NET 462.

Thank you kindly!

VisualStudioUI 3 Performance Bug

Most helpful comment

Hey all,

I've done some digging and made some improvements for some scenarios.

You can look at a video by downloading the zip. (it's a little over 1 min).
Fewer reloads by NuGet UI.zip

What's changing:

When either the project-level or solution level UI is open on the browse tab, the results and context are preserved. If a package was selected and displayed on the details tab, it will stay there.

What's not changing.

The installed/updates tab behave as did earlier and refresh and that's by design.
There are many ways to isntall/uninstall a package, specifically in SDK based PackageReference projects, so NuGet cnanot keep track easily. I will create an issue for intelligent refreshing of the Installed/Updates tabs.

All 15 comments

we should review all refresh event, make sure this is no unnecessary refresh

@StingyJack these two replies hurt. hurt. really. really. hard....

We have determined that this is a lower priority issue compared with the others we have

and

This is by design for now

Just use this product with a number of projects and have heaps of nugets in a project or even in a solution!

EDIT: Ha! just as I posted, @zhili1208 posted also :) So thanks for looking into this and giving it some nice tags :)

_REALLY_ appreciate it, @zhili1208

@PureKrome - I'm pretty sure they hate dealing with me at this point, and just auto-close my issues. Its not like I want to sit around all day doing testing for them, these things come up and block my work until I can get around them. And there are a lot of them.

please please please. can this be fixed?

Yeah - pretty damn annoying. 馃槩

Hey all,

I've done some digging and made some improvements for some scenarios.

You can look at a video by downloading the zip. (it's a little over 1 min).
Fewer reloads by NuGet UI.zip

What's changing:

When either the project-level or solution level UI is open on the browse tab, the results and context are preserved. If a package was selected and displayed on the details tab, it will stay there.

What's not changing.

The installed/updates tab behave as did earlier and refresh and that's by design.
There are many ways to isntall/uninstall a package, specifically in SDK based PackageReference projects, so NuGet cnanot keep track easily. I will create an issue for intelligent refreshing of the Installed/Updates tabs.

@nkolev92 thanks for looking into this

@nkolev92 cool :) is there a version number we can expect this in? so i can smoke test if

This will be in 16.3 Preview 2.

There are many ways to isntall/uninstall a package...

Aren't there just the two? Use PMUI or CLI?

Considering that the work that is/will be done isn't entirely matching the original request, I don't think you should close this until the OP agrees or accepts (or times out).

Aren't there just the two? Use PMUI or CLI?

PM UI, Package Manager Console.
In SDK based projects, the csproj can be edited, the reference can be removed from the solution explorer. Similarl the csproj can be edited outside of VS and and VS would detect and reload it.

There's also a follow up issue for further improvements https://github.com/NuGet/Home/issues/8283.

@nkolev92 - or does the PM UI close more frequently than before? It seems like instead of refreshing, it just closes and I have to keep reopening it.

@StingyJack I think my change shouldn't impact the closing of the UI.

Feel free to create an issue describing your scenario and repro steps.
Not aware of any current issues related to the UI closing.

Normally that should only be the case when the project gets unloaded.

Was this page helpful?
0 / 5 - 0 ratings