Absolutely good article: basic essentials of. NET program performance, good article. net performance Essentials

Source: Internet
Author: User

Absolutely good article: basic essentials of. NET program performance, good article. net performance Essentials

Bill Chiles (Program Manager of the Roslyn compiler) wrote an article titled "Essential Performance Facts and. NET Framework Tips, a well-known blogger Han jiangdu fishing, excerpted this article and shared some suggestions and Thoughts on performance optimization, for example, do not optimize too early, good tools are very important, and the key to performance lies in memory allocation. It also points out that developers should not blindly optimize without justification, first, locate and find out the cause of the performance problem.

The full text is as follows:

This article provides some performance optimization suggestions. These experiences come from using managed code to rewrite C # and VB compilers, we will use some real scenarios in the C # compiler as examples to demonstrate these optimization experiences .. . NET platform to develop applications with high productivity .. The powerful and secure programming language and rich class libraries on the NET platform make the development of applications very effective. But the larger the capability, the greater the responsibility. We should use the powerful capabilities of the. NET Framework, but if we need to process a large amount of data, such as files or databases, we also need to prepare for code optimization.

Why is performance optimization experience from new compilers also applicable to your applications?

Microsoft used the hosted code to rewrite the C # and Visual Basic compilers, and provided some new APIs for code modeling and analysis and development and compilation tools, visual Studio provides a richer programming experience with Code awareness. The experience of rewriting the compiler and developing Visual Studio on the new compiler gives us a very useful experience in performance optimization, which can also be used in large-scale applications.. NET application, or some apps that need to process a large amount of data. You do not need to understand the compiler. You can also draw these insights from the C # compiler example.

Visual Studio uses the compiler API to implement powerful intelligent awareness (intelliisense) functions, such as code keyword coloring, syntax filling list, error wave line prompts, parameter prompts, code problems and modification suggestions. These features are very popular with developers. When a developer inputs or modifies the code, Visual Studio dynamically compiles the code to obtain the code analysis and prompt.

When a user interacts with an App, the software is usually expected to be responsive. The application interface should not be blocked when you enter or execute commands. The help or prompt can be quickly displayed or the prompt will be stopped when the user continues to input. The current App should avoid blocking the UI thread during long-running computing so that users can feel that the program is not smooth enough.

Want to know

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.