Skip to content

Commit 244f6dc

Browse files
Remove specialized GC logic in Roslyn (#77628)
Intended to send through speedometer. Build: https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=11202294&view=results
2 parents e8f8e9d + 0890a95 commit 244f6dc

File tree

4 files changed

+1
-360
lines changed

4 files changed

+1
-360
lines changed

src/VisualStudio/Core/Def/Implementation/AbstractOleCommandTarget.Execute.cs

+1-58
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,6 @@ public virtual int Exec(ref Guid pguidCmdGroup, uint commandId, uint executeInfo
3535
{
3636
return ExecuteVisualStudio2000(ref pguidCmdGroup, commandId, executeInformation, pvaIn, pvaOut);
3737
}
38-
else if (pguidCmdGroup == VSConstants.GUID_VSStandardCommandSet97)
39-
{
40-
return ExecuteVisualStudio97(ref pguidCmdGroup, commandId, executeInformation, pvaIn, pvaOut);
41-
}
4238
else
4339
{
4440
return NextCommandTarget.Exec(ref pguidCmdGroup, commandId, executeInformation, pvaIn, pvaOut);
@@ -50,61 +46,8 @@ public virtual int Exec(ref Guid pguidCmdGroup, uint commandId, uint executeInfo
5046
}
5147
}
5248

53-
private int ExecuteVisualStudio97(ref Guid pguidCmdGroup, uint commandId, uint executeInformation, IntPtr pvaIn, IntPtr pvaOut)
54-
{
55-
switch ((VSConstants.VSStd97CmdID)commandId)
56-
{
57-
case VSConstants.VSStd97CmdID.Paste:
58-
case VSConstants.VSStd97CmdID.Delete:
59-
case VSConstants.VSStd97CmdID.SelectAll:
60-
case VSConstants.VSStd97CmdID.Undo:
61-
case VSConstants.VSStd97CmdID.Redo:
62-
case VSConstants.VSStd97CmdID.MultiLevelUndo:
63-
case VSConstants.VSStd97CmdID.MultiLevelRedo:
64-
GCManager.UseLowLatencyModeForProcessingUserInput();
65-
return NextCommandTarget.Exec(ref pguidCmdGroup, commandId, executeInformation, pvaIn, pvaOut);
66-
67-
default:
68-
return NextCommandTarget.Exec(ref pguidCmdGroup, commandId, executeInformation, pvaIn, pvaOut);
69-
}
70-
}
71-
7249
protected virtual int ExecuteVisualStudio2000(ref Guid pguidCmdGroup, uint commandId, uint executeInformation, IntPtr pvaIn, IntPtr pvaOut)
7350
{
74-
switch ((VSConstants.VSStd2KCmdID)commandId)
75-
{
76-
case VSConstants.VSStd2KCmdID.TYPECHAR:
77-
case VSConstants.VSStd2KCmdID.RETURN:
78-
case VSConstants.VSStd2KCmdID.TAB:
79-
case VSConstants.VSStd2KCmdID.BACKTAB:
80-
case VSConstants.VSStd2KCmdID.HOME:
81-
case VSConstants.VSStd2KCmdID.END:
82-
case VSConstants.VSStd2KCmdID.BOL:
83-
case VSConstants.VSStd2KCmdID.BOL_EXT:
84-
case VSConstants.VSStd2KCmdID.EOL:
85-
case VSConstants.VSStd2KCmdID.EOL_EXT:
86-
case VSConstants.VSStd2KCmdID.SELECTALL:
87-
case VSConstants.VSStd2KCmdID.OPENLINEABOVE:
88-
case VSConstants.VSStd2KCmdID.OPENLINEBELOW:
89-
case VSConstants.VSStd2KCmdID.UP:
90-
case VSConstants.VSStd2KCmdID.DOWN:
91-
case VSConstants.VSStd2KCmdID.BACKSPACE:
92-
case VSConstants.VSStd2KCmdID.DELETE:
93-
case VSConstants.VSStd2KCmdID.ECMD_INSERTCOMMENT:
94-
case VSConstants.VSStd2KCmdID.COMPLETEWORD:
95-
case VSConstants.VSStd2KCmdID.SHOWMEMBERLIST:
96-
case VSConstants.VSStd2KCmdID.PARAMINFO:
97-
case VSConstants.VSStd2KCmdID.RENAME:
98-
case VSConstants.VSStd2KCmdID.EXTRACTINTERFACE:
99-
case VSConstants.VSStd2KCmdID.EXTRACTMETHOD:
100-
case VSConstants.VSStd2KCmdID.PASTE:
101-
case VSConstants.VSStd2KCmdID.INSERTSNIPPET:
102-
case VSConstants.VSStd2KCmdID.SURROUNDWITH:
103-
GCManager.UseLowLatencyModeForProcessingUserInput();
104-
return NextCommandTarget.Exec(ref pguidCmdGroup, commandId, executeInformation, pvaIn, pvaOut);
105-
106-
default:
107-
return NextCommandTarget.Exec(ref pguidCmdGroup, commandId, executeInformation, pvaIn, pvaOut);
108-
}
51+
return NextCommandTarget.Exec(ref pguidCmdGroup, commandId, executeInformation, pvaIn, pvaOut);
10952
}
11053
}

src/VisualStudio/Core/Def/Implementation/GCManager.cs

-115
This file was deleted.

src/VisualStudio/Core/Def/Implementation/VirtualMemoryNotificationListener.cs

-183
This file was deleted.

src/VisualStudio/Core/Def/ProjectSystem/VisualStudioWorkspaceImpl.cs

-4
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,6 @@ internal abstract partial class VisualStudioWorkspaceImpl : VisualStudioWorkspac
9696
/// </summary>
9797
private readonly Dictionary<string, UIContext?> _languageToProjectExistsUIContext = [];
9898

99-
private VirtualMemoryNotificationListener? _memoryListener;
100-
10199
private OpenFileTracker? _openFileTracker;
102100
internal IFileChangeWatcher FileChangeWatcher { get; }
103101

@@ -195,15 +193,13 @@ public async Task InitializeUIAffinitizedServicesAsync(IAsyncServiceProvider asy
195193
solutionClosingContext.UIContextChanged += (_, e) => ProjectSystemProjectFactory.SolutionClosing = e.Activated;
196194

197195
var openFileTracker = await OpenFileTracker.CreateAsync(this, ProjectSystemProjectFactory, asyncServiceProvider).ConfigureAwait(true);
198-
var memoryListener = await VirtualMemoryNotificationListener.CreateAsync(this, _threadingContext, asyncServiceProvider, _globalOptions, _threadingContext.DisposalToken).ConfigureAwait(true);
199196

200197
// Update our fields first, so any asynchronous work that needs to use these is able to see the service.
201198
// WARNING: if we do .ConfigureAwait(true) here, it means we're trying to transition to the UI thread while
202199
// semaphore is acquired; if the UI thread is blocked trying to acquire the semaphore, we could deadlock.
203200
using (await _gate.DisposableWaitAsync().ConfigureAwait(false))
204201
{
205202
_openFileTracker = openFileTracker;
206-
_memoryListener = memoryListener;
207203
}
208204

209205
await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(_threadingContext.DisposalToken);

0 commit comments

Comments
 (0)