📜 ⬆️ ⬇️

Visual Studio "15" Preview 5

On October 5, 2016, Visual Studio “15” Preview 5 was released . The development team has focused on improving the performance of the IDE. In this article we will look at some of the improvements. Run the installer and, while it is being installed, read about the innovations in this article or in the original release notes .

Significant step forward in performance and memory savings


I would like to start with a video that very well shows the increase in performance in this preview. This shows the download of the project Roslyn, which previously took 60 seconds, and the new preview fully ends by the 30th second.



Acceleration of loading is the result of several improvements, such as, for example, lightweight loading of projects and loading on demand extensions. The entire list of innovations includes the following things:
')
Less loading time thanks to the new “lightweight” download . If you have hundreds of projects, this does not mean that you will work with each of them right now. VS "15" allows you to edit, build and debug code without having to wait for the download of all projects. You can test this feature with managed projects by including the “Lightweight Solution Load” checkbox in Tools -> Options -> Projects and Solutions.

Acceleration of loading due to delayed loading of extensions . The idea is simple: load extensions when they are needed, and not immediately when you start Visual Studio. In this preview, we started working on downloading our extensions for Python and Xamarin only when (and if!) They are needed. In the future, all extensions (from both Microsoft and third-party companies) will work according to this scheme. If you are wondering how this or that extension affects the download speed of Visual Studio, now you can find out by opening the menu Help -> Manage Visual Studio Performance. Are you developing your extension? We will soon publish recommendations on how to transfer it to a new scheme of work with deferred loading.

Transfer of some memory-intensive subsystems from the main Visual Studio process to separate processes . We have selected some components, such as Git Source Control, Javascript and Typescript services in separate processes. This reduced the impact of pauses in their work on the responsiveness of the user interface in the main Visual Studio process. In addition, it allowed to move further from the limit of 4 GB of memory per process imposed by 32-bit versions of the operating system. We plan to continue work on the allocation of subsystems into separate processes in future releases.

Faster loading, editing and debugging of C ++ projects . We separately improved the performance of working with C ++ code. Watch this video here . You can enable this feature for your projects using the option “Enable Faster Project Load”, which is located in Tools -> Options -> Text Editor -> C / C ++ -> Experimental. We also made a change to the linker and PDB file loading mechanism in order to make the debugger launch much faster, and also reduce the memory consumption during debugging.

Improved Git speed, debugging and XAML editing . We accelerated work with Git by replacing the use of libgit2 with git.exe. The debugger speed is increased by optimizing initialization costs, using IntelliTrace and Diagnostic Tools. Also managed to remove several delays that occur when editing XAML files.

This is just the beginning and we continue to work on making Visual Studio faster, more responsive, more economical to memory. In the next blog posts of the Visual Studio team, we will try to tell you in more detail about each of the innovations.

Productivity improvement


In Visual Studio “15” there are also a number of new features aimed at increasing the programmer’s productivity.

Code editing


IntelliSense filters are now available for C #, VB and C ++. When using complex APIs, you can narrow the scope to only the type of objects that you are interested in at the moment (for example, methods, properties, or events). In C # and Visual Basic, we define the “required type”, which is expected in the current position and in advance select entities of the corresponding type from the list. This speeds up your code set and removes the need to sort through unnecessary items in the list.

image

In C ++, we also had experimental support for similar functionality, it is called Predictive IntelliSense, and it also relieves the programmer from paging through long lists of auto-completion. Only topical tips in this context will be displayed, sorted by the likelihood of how useful they may be. This feature can be enabled in Tools> Options> Text Editor> C / C ++> Experimental.

For XAML, we added the ability to autocomplete for x: Bind, which allows us to comfortably bind to properties and events. Namespace autocompletion allows you to add prefixes if the namespace reference already exists. IntelliSense for XAML has also been updated to filter out unsuitable types and properties.

For JavaScript, we completely rewrote IntelliSense support service. Previously, the JavaScript engine continuously executed the typed code in the course of how you typed it. This made it possible to get auto-completion lists at runtime. Such dynamism is a good thing and the essence of JavaScript in general, but not the best way to help a programmer with code editing. The new service uses static analysis for better auto-completion, including all the features of ES6 / ES7.

image

Quick changes and refactoring


In order to help you keep your code in a good, readable state, we have added even more quick edits (Quick Actions) and refactoring features for C # and Visual Basic. For example, “Move Type to Matching File” moves the type to a new file with the same name. “Sync File and Type Name” allows you to rename a type so that its name corresponds to the name of the file in which it is located (or vice versa). And finally, “Convert to Interpolated String” allows you to use the interpolation strings available in C # 6.0 and VB14 instead of “string.Format”.

image

Code Navigation


Look around and understand where you are can be difficult when working with a large code base. We have added some new features related to navigation. Go To: (Ctrl +, or Ctrl + T) will allow you to quickly find files, types, methods, or other types of entities in your code.

image

Find all links (Shift + F12) helps you understand code links, even in very large code bases. This feature allows you to group, filter, sort and search for results, and for some languages ​​it also supports highlighting, which allows you to better orient and understand the dependencies in the code.

image

Debugging


In Preview 5, we added a new experimental Run to Click feature. You no longer need to set temporary breakpoints in order to skip a block that is not interesting to you and stop on a specific line. When you stop in the debugger, just click on the icon that appears on the line you need. The debugger will start the execution of the code from the current location to the position you have pointed to. You can enable this feature in Debug> Options> Enable Run to Click.

image

It's time to try


This article does not explain everything about this preview, the full list of innovations is in the release notes .

Several important features of this preview. First of all, it is unsupported, and therefore it is not worth while to use it in critical manufacturing processes. Secondly, this preview can be installed in parallel with previous versions of Visual Studio, but cannot be installed in parallel with other Visual Studio “15” previews, which means you will have to remove them before installing it. Read more about this in the frequently asked questions .

As always, feedback is welcome. For error messages, you can use the Report a Problem function built into Visual Studio and the installer. You can leave your feedback on the developer portal . Tips and suggestions are accepted on UserVoice

Source: https://habr.com/ru/post/312198/


All Articles