-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Remove most remaining workspace changed on UI thread #79391
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
Changes from all commits
4ff7f62
f7a48dd
41feeea
dfed2d3
452703e
b17682a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -50,9 +50,6 @@ public StackTraceExplorerViewModel(IThreadingContext threadingContext, Workspace | |
| _threadingContext = threadingContext; | ||
| _workspace = workspace; | ||
|
|
||
| // Main thread dependency as Workspace_WorkspaceChanged modifies an ObservableCollection | ||
| _ = workspace.RegisterWorkspaceChangedHandler(Workspace_WorkspaceChanged, WorkspaceEventOptions.RequiresMainThreadOptions); | ||
|
|
||
| _classificationTypeMap = classificationTypeMap; | ||
| _formatMap = formatMap; | ||
|
|
||
|
|
@@ -103,15 +100,6 @@ private void CallstackLines_CollectionChanged(object sender, System.Collections. | |
| NotifyPropertyChanged(nameof(IsInstructionTextVisible)); | ||
| } | ||
|
|
||
| private void Workspace_WorkspaceChanged(WorkspaceChangeEventArgs e) | ||
| { | ||
| if (e.Kind == WorkspaceChangeKind.SolutionChanged) | ||
| { | ||
| Selection = null; | ||
| Frames.Clear(); | ||
| } | ||
| } | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why was this safe/correct to remove?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah comment was in the previous PR of this: I suspect the intended behavior of this code was to clear out the list of frames on Solution Close; i.e. you closed the solution so you're done with it. But the code had a typo of "SolutionChanged", which doesn't make any sense at all. It means you'll clear the frame list on something like a project being loaded (which will do a SolutionChanged if it impacts project-to-project references)....but not anything else? Clearly we haven't had problems with it not being cleared on SolutionClose, and I didn't understand why that'd be good anyways (maybe you've pasted in a stack and you need to switch the solution to navigate to it?) so I just deleted this. |
||
|
|
||
| private FrameViewModel GetViewModel(ParsedFrame frame) | ||
| => frame switch | ||
| { | ||
|
|
||
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.
250 'feels' good to me. It's less than a user could ever notice, while allowing a lot to batch up in firehose scenarios.
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.
Yeah, I imagine this will be noticeable to those users who can perfectly time opening a document right after solution load completes and can do their first OOP dependent operation within 200ms.