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 for Converge360.

comments powered by Disqus

Featured

  • Move Over, Stack Overflow: Microsoft Launches Q&A for .NET

    Stack Overflow probably isn't worried, but Microsoft has launched its own Q&A site for all things .NET, seeking to provide a one-stop-shop for getting .NET technical questions answered by the community.

  • Developer Decries WinForms-to-Blazor Performance Degradation

    Since shipping .NET 5, Visual Studio 2019 v16.8 and more goodies recently, Microsoft has been touting speed improvements in many components -- including the red-hot Blazor project -- but some real-world developers are finding different results.

  • Google Cloud Functions Supports .NET Core 3.1 (but not .NET 5)

    Google Cloud Functions -- often used for serverless, event-driven projects -- now supports .NET, but the new support is a release behind Microsoft's latest .NET offering.

  • Binary Classification Using PyTorch: Model Accuracy

    In the final article of a four-part series on binary classification using PyTorch, Dr. James McCaffrey of Microsoft Research shows how to evaluate the accuracy of a trained model, save a model to file, and use a model to make predictions.

  • Visual Basic in .NET 5: Ready for WinForms Apps

    With the milestone .NET 5 and Visual Studio 2019 v16.8 releases now out, Microsoft is reminding Visual Basic coders that their favorite programming language enjoys full support and the troublesome Windows Forms Designer is even complete -- almost.

Upcoming Events