VS as the first editor of the universe, especially after the release of 2017 should attract countless programmers to use, but the VS2017 start speed is slow, so specially studied the VS2017 to accelerate the start of the method. The following methods are Microsoft official advice, you can try.
Uninstall program
You can uninstall little-used individual projects from Solution Explorer by using the right-click context menu.
Refactoring the solution
You can split the solution into smaller solution files and include common projects in these files. This refactoring can significantly reduce the memory usage of the workflow. In addition, the smaller the solution, the faster it loads.
Configure debug options
If you often run out of memory during a debugging session, you can optimize performance by changing one or more configurations.
Enable “Only My Code”
The simplest optimization is to enable the “Only My Code” feature, which only loads your project’s symbols. With this feature enabled, you can save a lot of memory when debugging managed applications (.NET). This option is enabled by default for some project types.
To enable “Only My Code”, select “Tools”>; “Options” & gt; “Debugging” & gt; “General”, then select “Enable My Code Only”.
Specifies the symbol to load
For native debugging, loading the symbol file (.pdb) takes up a lot of memory resources. You can save memory by configuring the debugger symbol Settings. Typically, configure the solution to load only modules in your project.
To specify symbol loading, select Tools>; “Options” & gt; “Debugging” & gt; “Symbol.”
sets the option to “Specify modules only” instead of “All modules” and then specifies the payload to load. When debugging, you can also right-click on a particular module in the Modules window to include its display in the system load. (To open the window while debugging, select Debug>; “Window” & gt; “Modules.”)
Disable diagnostic tools
It is recommended to disable it after using CPU profiling. This feature can be resource-intensive. After CPU analysis is enabled, it remains enabled for subsequent debugging sessions, so it can be displayed off when it is complete. If you do not need the functionality provided, you can save some resources by disabling the diagnostic tool during debugging.
To disable Diagnostics Tools, start a debug session and select Tools>; “Options” & gt; Enable Diagnostic Tools, then deselect the option.
Disable full solution analysis
Visual Studio performs analysis on the entire solution to provide a rich experience of the errors before the call is generated. This feature can be used to identify errors as quickly as possible. However, for very large solutions, this feature can be a significant memory resource hog. If you run out of memory or similar problems, you can disable this experience and release these resources. By default, Visual Basic enables this option, while C# disables it.
To disable Complete Solution Analysis, select Tools>; “Options” & gt;> “Text Editor” ”
Disable CodeLens
Visual Studio performs the Find All References task for each method displayed. Codelens provides functions such as inline display of reference numbers. Working in a separate process (for example, ServiceHub. RoslynCodeAnalysisService32). In very large solutions or resource-constrained systems, this feature can have a significant impact on performance, even if it is run at a lower priority. If you encounter high CPU or memory problems during this process (for example, when loading a large solution on a 4 GB machine), try disabling this feature to free up resources.
To disable CodeLens, select Tools>; “Options” & gt;> “Text Editor” ‘All Languages’> “Codelens”, then deselect the feature.
This feature is available in Visual Studio Professional and Visual Studio Enterprise.
Other tools and extensions
disable
Extensions are additional software components that are added to Visual Studio to provide new functionality or extend existing functionality. Expansion can often cause memory resource problems. If you encounter memory resource issues, try disabling the extension one at a time and see how this affects the schema or workflow.
to disable extension, please go to “tools” | “extension and update”, and then disable specific extensions.
Disable the XAML designer
By default, the XAML designer is enabled, but it only consumes resources when the.xaml file is opened. If you are using XAML files but do not want to use the designer feature, disable this feature to free up memory.
To disable the XAML designer, go to Tools>; “Options” & gt; “XAML Designer”> “Enable XAML Designer,” then deselect the option.
Delete the workload
You can use the Visual Studio installer to remove workloads that are no longer used. This action can skip packages and assemblies that are no longer used, thus optimizing startup and run time resource utilization.
Forced Garbage Collection
CLR uses a garbage collection memory management system. On this system, memory is sometimes consumed by objects that are no longer needed. This state is temporary and the garbage collector frees the memory based on its performance and resource usage heuristics. You can force the CLR to reclaim any unused memory by using hotkeys in Visual Studio. If there is a large amount of garbage waiting to be collected and garbage collection has been forced, you can see the memory utilization decrease for the devenv.exe process in the task manager. You rarely need to use this method. However, after a high-resource operation has been completed, such as a full build, debug session, or solution open event, this approach can help determine how much memory the process is actually using. Because Visual Studio is a hybrid (managed and native), native allocators and garbage collectors may sometimes compete for limited memory resources. This may help to force the garbage collector to run when memory usage is high.
To force garbage collection, use the hotkeys: Ctrl+Alt+Shift+F12, Ctrl+Alt+Shift+F12 (press twice).
Read More:
- Eclipse automatic prompt setting method and optimization
- Bitmap optimization and memory optimization
- Modification method of starting value of MySQL auto increment ID
- OpenGL Programming Guide 8th Edition 9th Edition vs2015 vs2017 configuration method
- Configuring OpenGL development environment in win10 + vs2015 (including the method of installing 32-bit and 64 bit libraries)
- The Ubuntu status bar shows the network speed, memory and CPU utilization ratio
- Flash back after vs compiler running, processing method
- Vs2015 + OpenGL configuration method
- Location and optimization of server IO high problem
- Start gzip in node environment of project optimization
- OpenGL environment configuration under VS2010 / vs2012 / vs2015
- Optimization and upgrade solution for one click deployment without Jenkins under Linux
- [pit filling] problem summary of upgrading VS2010 project to vs2017
- After vs2019 is installed, the original vs2017 project cannot compile various error reports
- Vtk7. X is compiled and installed under vs2013 and vs2015
- Common compatibility problems of VS2010 to vs2017 projects
- Difference between isempty method and isblank method in stringutils
- “Method does not override method from its superclass”
- Vs + QT reports an error “vs cannot open the source file qchartview”
- Solve the problem that power view in Excel prompts activate method of oleobject class failed or activate method like oleobject is invalid