Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
jasonmalinowski wants to merge5 commits intodotnet:main
base:main
Choose a base branch
Loading
fromjasonmalinowski:remove-most-remaining-workspace-changed-on-ui-thread

Conversation

jasonmalinowski
Copy link
Member

This is a reapply of#78778 that got reverted due to a potential regression.

Commit-at-a-time is recommended, since each use gets its own commit with further analysis there.

The remaining uses of eventing that hit the UI thread (of any kind of workspace event) are:

  1. Inline rename subscribes when there is an active rename to cancel on changes it doesn't know about. Since this is only active during the session, it doesn't seem worth it change it.
  2. MiscellanousFilesWorkspace subscribes to workspaceregistration changed, which is when a document is opened/closed, and that's not urgent to fix and restricted to just registration events.
  3. XamlProjectService subscribes to documentclosed. This only happens if XAML is loaded in the first place, and then is only raised on the close path. I looked at making a small change to move it off but the code is generally quite scary and since it's document close only that's not chatty.

@CyrusNajmabadi
Copy link
Member

image

I am signing off, as long as zero files are changed.

JoeRobich reacted with eyes emoji

@jasonmalinowskijasonmalinowskiforce-pushed theremove-most-remaining-workspace-changed-on-ui-thread branch from6c0511b to7e62a44CompareJuly 16, 2025 23:23
All subscribers are working in thread-safe manners (they either takelocks to clear caches, or use existing batching/threading primitives toqueue new work).
Subscribers were already thread safe. I've also removed the IMPORTANTwarning since it seems quite stale -- this is already in a delayed queueso it's not really clear what it meant.
I'm unable to figure out what the intent was here -- it clears the listbut only on a SolutionChanged event, which is the type of eventraised if multiple projects are modified at once in a single workspacechange -- any other type of event would have a more specific kind.I could imagine the intent might have been for solution close, butthen I can imagine scenarios where the user might have pasted a stackand now needs to switch the solution to navigate from the stack.Since this likely never ran, I'm just deleting it.
If the user expands a node in a CPS project wanting to look at thediagnostics under an analyzer, but we haven't been told about thatanalyzer let, we stick a WorkspaceChanged handler there to find it onceit comes back. We were hopping to the UI thread to see if theCanonicalName of the item could have changed, but that's not reallygoing to happen ever for these items, so we can just grab it onceduring creation and be done with it.
This looks to be safely callable from any thread.
@jasonmalinowskijasonmalinowskiforce-pushed theremove-most-remaining-workspace-changed-on-ui-thread branch from7e62a44 to452703eCompareJuly 18, 2025 22:16
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees

@jasonmalinowskijasonmalinowski

Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@jasonmalinowski@CyrusNajmabadi

[8]ページ先頭

©2009-2025 Movatter.jp