News

In New Releases, Microsoft Lauds .NET Productivity, Visual Studio 2019 Speed

Microsoft is continuing to crow about .NET productivity and speed gains in Visual Studio 2019 following last week's mass shipments of .NET 5, Visual Studio 2019 v16.8 and more.

"The improvements are massive and will greatly improve our iteration times," the company quoted The Coalition's Aurel Cordonnier as saying of Visual Studio speed gains observed in testing by the game-maker.

The Coalition, which produces the popular game Gears 5, tested the compile and link times in three different versions of Visual Studio.

Gears 5
[Click on image for larger view.] Gears 5 (source: Microsoft).

"The experiment was conducted to measure not only overall end-to-end time improvements but also link time improvements in the preview compared to the current release," Microsoft said in a Nov. 16 blog post from the C++ team. "Using Visual Studio 2019, the team saw 2.67x faster end-to-end build times and 27.9x faster link times compared to Visual Studio 2017."

Gears 5 Test Results
[Click on image for larger view.] Gears 5 Test Results (source: Microsoft).

The post goes into detail about the testing's methodology and results, noting that the Gears 5 dev team didn't conduct it with the idea of moving the game's development to the latest iteration of Microsoft's flagship IDE. Generally, big game-makers that eek out the best possible performance in finely tuned, close-to-the-metal C++ code probably aren't likely to introduce too many radical changes in existing projects.

"So, we're not actually moving Gears 5 to 2019," Cordonnier said. "We did the work to get Visual Studio 2019 going on PC for the purpose of comparing build times and providing feedback. Gears 5 shipped over a year ago and the game has been very carefully tuned; therefore, we don't want to take the risk of changing the toolchain as we have limited testing capacity and very slight optimization changes could change the balance of the game in very subtle ways. In addition, the XDK does not support 2019 so we would need to support two toolchains which is something we don't have the capacity for.

"The results of the experiment reinforced our desire to stay current with new versions of Visual Studio for our future projects."

As a result of the testing, though, an unannounced future project will be done on VS 2019, Cordonnier said.

Meanwhile, the .NET Productivity team penned its own post about productivity enhancements, powered by the .NET Compiler Platform called "Roslyn."

We've seen a lot of excitement in the past few months over our latest features which automate and reduce editing tasks to a single click and help save you time," said Mika Dumont, program manager, .NET and Visual Studio team.

She focused on two areas -- tooling and code fixes/refactorings -- and provided highlights summarized below:

  • Tooling Improvements:
    • Roslyn analyzers now come with the .NET SDK and are enabled by default for projects that target .NET 5.0 or later.
      Enabling .NET Analyzers
      [Click on image for larger view.] Enabling .NET Analyzers (source: Microsoft).
    • Inline parameter name hints, another new feature, inserts adornments for literals, casted literals and object instantiations before each argument in function calls. Furthermore, the first preview of the next Visual Studio iteration, v16.9, includes inline type hints for variables with inferred types and lambda parameter types.
    • Developers can now extract members from a selected class to a new base class with the new extract base class refactoring.
    • Code cleanup sports new configuration options to apply formatting and file header preferences set in an EditorConfig file across a single file or an entire solution.
  • Code Fixes/Refactorings (via lightbulb or screwdriver icons):
    • Developers can replace usages of a static, instance and extension method within a single statement body with an option to remove the original method declaration, all via the new The inline method refactoring.
    • "The use pattern matching refactoring introduces the new C# 9 pattern combinators. Along with the pattern matching suggestions, such as converting == to use is where applicable, this code fix also suggests the pattern combinators and, or and not when matching multiple different patterns and negating."
    • Another refactoring, make class abstract, quickly solves the problem of making a class abstract when trying to write an abstract method in a non-abstract class.
    • "The convert typeof to nameof refactoring allows you to easily convert instances of typeof(<QualifiedType>).Name to nameof(<QualifiedType>) in C# and instances of GetType(<QualifiedType>).Name to NameOf(<QualifiedType>) in Visual Basic. Using nameof instead of the name of the type avoids the reflections involved when retrieving an object."

Much more detail on all of the above is presented in the post, and more information canbe found in the Visual Studio release notes.

This week's speed/productivity posts follow others that tout the benefits of Microsoft's new wares, such as one we covered last week in this article: "Blazor and ASP.NET Core Get Faster in .NET 5."

About the Author

David Ramel is an editor and writer at Converge 360.

comments powered by Disqus

Featured

  • Compare New GitHub Copilot Free Plan for Visual Studio/VS Code to Paid Plans

    The free plan restricts the number of completions, chat requests and access to AI models, being suitable for occasional users and small projects.

  • Diving Deep into .NET MAUI

    Ever since someone figured out that fiddling bits results in source code, developers have sought one codebase for all types of apps on all platforms, with Microsoft's latest attempt to further that effort being .NET MAUI.

  • Copilot AI Boosts Abound in New VS Code v1.96

    Microsoft improved on its new "Copilot Edit" functionality in the latest release of Visual Studio Code, v1.96, its open-source based code editor that has become the most popular in the world according to many surveys.

  • AdaBoost Regression Using C#

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the AdaBoost.R2 algorithm for regression problems (where the goal is to predict a single numeric value). The implementation follows the original source research paper closely, so you can use it as a guide for customization for specific scenarios.

  • Versioning and Documenting ASP.NET Core Services

    Building an API with ASP.NET Core is only half the job. If your API is going to live more than one release cycle, you're going to need to version it. If you have other people building clients for it, you're going to need to document it.

Subscribe on YouTube