HomeWinBuzzer NewsMicrosoft’s New Code Optimizations Brings AI Coding Help to .NET Developers

Microsoft’s New Code Optimizations Brings AI Coding Help to .NET Developers

Developers building .NET applications can use Code Optimizations to gain insights and recommendations to improve code.


has announced the public preview of Code Optimizations, a new AI-based service that can help developers improve the performance of their .NET applications and cloud services. Code Optimizations is a feature within Azure Application Insights that analyzes profiler traces from .NET apps and services and provides insights and recommendations on how to fix performance issues.

Code Optimizations is a service that uses an AI model trained on thousands of traces collected from Microsoft-owned services around the globe. The model can learn from the patterns and best practices of performance engineers at Microsoft and apply them to .NET apps and services. Code Optimizations can identify and solve a wide range of performance issues, such as, incorrect API usages, unnecessary allocations, exceptions, and concurrency.

Code Optimizations can also detect anomalies whenever an app or service exhibits abnormal CPU or memory behavior. Code Optimizations can help developers optimize the performance of their .NET apps and services by:

  • Saving time and effort: Developers can use Code Optimizations to automatically uncover complex performance bugs and get guidance on how to solve them, instead of manually sifting through gigabytes of profiler data or relying on trial-and-error methods.
  • Improving user experience: By improving the speed and reliability of an app or service, developers can enhance user satisfaction and retention rates. This can also help them gain a competitive edge over other apps or services in their market.
  • Saving money: By fixing performance issues early and efficiently, developers can reduce the need for scaling out cloud resources or paying for unnecessary compute power. This can help them avoid problems such as cloud sprawling or overspending on their Azure bill.

How to use Code Optimizations?

Code Optimizations runs at no additional cost and has no impact on the app's performance. It is currently available in the same regions as Application Insights. To use Code Optimizations during its public preview period, developers need to:

  • Sign up for Application Insights if they haven't already.
  • Enable the Application Insights Profiler for their .NET app or service.
  • Access Code Optimizations through the Performance blade from the left navigation pane in Azure Monitor and select Code Optimizations (preview) from the top menu.

Microsoft's Push Into AI-Driven Coding

Microsoft is already leveraging AI to deliver coding solutions to customers. That most notable example is GitHub , which while fundamentally different to Code Optimizations, is democratizing by using AI.

GitHub Copilot was launched in 2021 as an AI program co-development between Microsoft and partner OpenAI. The program launched fully in 2022, giving users AI automated code that fills in gaps in their own projects. Last month, Microsoft introduced GitHub Copilot X, which integrates 's GPT-4 AI model into the service.

GitHub Copilot has been receiving widespread criticism from open-source copyright advocates since its launch. Many claim it is unfair that the project scrapes the code of other users without attributing it to them.

The service is currently involved in a class action lawsuit by Matthew Butterick, who claims Microsoft is violating GitHub's policies and code ethics such as attribution. Elsewhere, a recent study shows Copilot may produce less accurate and less secure code than human developers.

Last Updated on May 14, 2024 10:57 am CEST

Luke Jones
Luke Jones
Luke has been writing about all things tech for more than five years. He is following Microsoft closely to bring you the latest news about Windows, Office, Azure, Skype, HoloLens and all the rest of their products.

Recent News