Skip to content

Optimize InheritanceMarginGlyph construction#56471

Merged
sharwell merged 5 commits intodotnet:mainfrom
sharwell:lazy-contextmenu
Sep 20, 2021
Merged

Optimize InheritanceMarginGlyph construction#56471
sharwell merged 5 commits intodotnet:mainfrom
sharwell:lazy-contextmenu

Conversation

@sharwell
Copy link
Copy Markdown
Contributor

@sharwell sharwell commented Sep 17, 2021

This change reduces the amount of work required to render Inheritance Margin glyphs which users did not directly interact with.

  • Move Inheritance Margin context menu to a separate control (lazily initialized)
  • Initialize Inheritance Margin glyphs in code; eliminate BAML parsing
  • Optimize one-way bindings for Inheritance Margin glyphs

@ghost ghost added the Area-IDE label Sep 17, 2021
@Cosifne
Copy link
Copy Markdown
Member

Cosifne commented Sep 17, 2021

: ) Actually I am working on a similar change.
I think it would be better to let @CyrusNajmabadi to test the change first


var cancellationToken = context.UserCancellationToken;
var rehydrated = await viewModel.DefinitionItem.TryRehydrateAsync(cancellationToken).ConfigureAwait(false);
if (rehydrated == null)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

aside @Cosifne this is an unfortunate way to do things. it means that navigation could take a large amount of time just to realize the symbol just to get its' location. For source symbols we could greatly speed this up by just store the DocIdSpan and navigating immediately to that.

@sharwell sharwell marked this pull request as ready for review September 17, 2021 18:47
@sharwell sharwell requested a review from a team as a code owner September 17, 2021 18:47
@sharwell sharwell changed the title Move the inheritance margin context menu to a separate control Optimize InheritanceMarginGlyph construction Sep 17, 2021
@sharwell sharwell enabled auto-merge September 20, 2021 17:03
@sharwell sharwell merged commit f6e2a28 into dotnet:main Sep 20, 2021
@ghost ghost added this to the Next milestone Sep 20, 2021
@sharwell sharwell deleted the lazy-contextmenu branch September 20, 2021 18:22
@Cosifne Cosifne modified the milestones: Next, 17.0.P5 Sep 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants