. NET application performance improvement application skills

Source: Internet
Author: User

I recently spent a lot of time researching. net Performance Improvement issues, on the MS website also found a lot of good information, the following content is estimated to be more or less used, posted here, I hope it will be helpful to everyone's work.

Performance tips for all applications:

    • Throw fewer exceptions
    • Make chunky cballs
    • Design with valuetypes
    • Use addrange to add groups
    • Trim your working set
    • Use for loops for string iteration-Version 1
    • Use stringbuilder for complex string manipulation
    • Precompile Windows Forms applications
    • Use jarged Arrays-Version 1
    • Keep Io buffer size between 4kb and 8kb
    • Be on the lookout for asynchronous Io opportunities

Performance tips for ASP. NET Applications

Cache aggressively
Use session State only if you need
Use view State only if you need
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 calland allocations

Call type # CILS/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

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.