-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Add new workspace event that gives handlers the opportunity to be processed immediately #76932
Open
ToddGrun
wants to merge
17
commits into
dotnet:main
Choose a base branch
from
ToddGrun:WorkspaceChangedImmediate
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+166
−87
Open
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
e0765de
WIP: Add new workspace event that gives handlers the opportunity to b…
ToddGrun 0394a81
don't use nullability annotations
ToddGrun 4ca3e4a
Merge branch 'dotnet:main' into WorkspaceChangedImmediate
ToddGrun 445cc6c
Add a big old range for funciton ids that don't fit into other catego…
ToddGrun b1797c2
Remove the _textChange ABWQ point of asynchronicity to try and furthe…
ToddGrun ce1b2b7
Switch a couple tests from FeaturesTestCompositions to EditorTestComp…
ToddGrun 8a841d6
push out aggregated telemetry with success/fail counts for SolutionCh…
ToddGrun 64a596b
Comment the JTF.RunAsync call
ToddGrun d715ab9
move duplicated code to helper method
ToddGrun c643d4b
Add assert
ToddGrun 595fb9f
Go ahead and catch exceptions during EventMap eventing
ToddGrun 019e48b
change DispatchSynchronizeTextChanges to not allocate the keyname on …
ToddGrun 2b36d47
Merge branch 'main' into WorkspaceChangedImmediate
ToddGrun 90003c9
Fix bad merge
ToddGrun d58e649
just use a fire and forget task and don't use IThreadingContext to si…
ToddGrun 2cfcd65
Try out a Task.Yield to alleviate the concerns about doing a large am…
ToddGrun 5740465
Merge branch 'main' into WorkspaceChangedImmediate
ToddGrun File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I'm confused a bit by the semantics we're trying to have here for OnWorkspaceChangedImmediate. The statement was "it must be very fast", but now we're computing checksums? I imagine the async-ness here is we use an AsyncLazy<> under the covers, and so if somebody else is asking we won't block our thread. But this newDocument is very new (indeed, we're still raising events for it!) so would this be the first place it'll get called? And would that then be consuming CPU right here when we wanted this to be cheap?
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.
This is a very valid concern, debugged into the hash computation for the newDocument, and this is forcing it on the calling (UI) thread. Need to think on this.
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.
Added the task.Yield as Cyrus suggested, and verified that all the calculations have moved to a bg thread, but still saw pretty good allocation numbers as outlined in the PR updated description.