Skip to content

MEF Performance Improvement #14027

@jgonz120

Description

@jgonz120

NuGet Product(s) Affected

Visual Studio Package Management UI

Current Behavior

Currently when opening the PM UI NuGet loads MEF objects which can cause a significant delay in displaying the window.

Desired Behavior

When users go to open the PM UI we should immediately open the window and give a loading indication while the view is initialized.

Additional Context

NuGetPackage creates the PackageManagerControl before the window is created, for example PackageManagerControl.CreateAsync is called and we wait until after it's completed to create the window.

InitializeAsync, which is called by CreateAsync, attempts to load 5 MEF components. Which can cause a significant delay if this is the first time we attempt to load MEF components in the VS session. There are additional async calls in the method which can delay how long the component takes to load. If those calls are made on the UI thread, VS will hang while it waits for the calls to complete.

NuGet/NuGet.Client#6190 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Functionality:VisualStudioUIPackage Manager UI et alPriority:3Issues under consideration. With enough upvotes, will be reconsidered to be added to the backlog.Product:VS.ClientTenet:PerformancePerformance issuesType:DCRDesign Change Request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions