Performance improvement application techniques for. NET applications

Source: Internet
Author: User
Program | skills | performance

Recently spent a lot of time studying. NET performance promotion problem, in MS's website also found a lot of good information, the following content estimated that we have used some more or less, posted here, hoping to be helpful to everyone's work.

Performance Tips for all applications:

Throw fewer exceptions
Make Chunky Calls
Design with ValueTypes
Use AddRange to Add Groups
Trim Your Working Set
Use as Loops for String iteration-version 1
Use StringBuilder A for Complex String manipulation
Precompile Windows Forms Applications
Use jagged Arrays-version 1
Keep IO Buffer Size Between 4KB and 8KB
is on the Lookout for asynchronous IO opportunities

Performance Tips for ASP.net applications

        Cache aggressively
        Use sessions State only if you are Need to
        use View State only if you Need to
        Avoid STA COM
        Batch Compile
        Remove unnecessary Http Modules
         avoid the AutoEventWireup Feature
        Encode Using ASCII When you Don ' t Need UTF
        Use the Optimal authentication Procedure
       

Appendix:cost of Virtual Calls and allocations
Call Type # Calls/sec
ValueType Non-virtual Call 809971805.600
Class non-virtual Call 268478412.546
Class Virtual Call 109117738.369
ValueType Virtual (Obj method) Call 3004286.205
ValueType Virtual (overridden Obj method) call 2917140.844
Load Type by Newing (non-static) 1434.720
Load Type by Newing (Virtual Methods) 1369.863

MORE:http://msdn.microsoft.com/library/en-us/dnpag/html/scalenet.asp?frame=true

Source: The temperament of the Bear (Minbear) BLOG



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.