101 metrics for a perfect website. Part 6: Performance

Source: Internet
Author: User
Tags website performance
The performance of the website is related to the user access experience. It is our goal to support more users and shorten the waiting time for each user. Performance improvement depends on Database optimization and efficient HTML Code Rendering and content caching. The following are some rules for improving website performance:

Optimize the database design

Rational use of indexes and efficient SQL statements can reduce the full table scan of database tables and only return necessary data. These are very effective database optimization methods, databases are often the performance bottleneck of a website. You need to continuously optimize the database. Each negligible performance improvement will bring a qualitative change in the accumulation.

Use store procedure for data exchange between the database and the website business layer

The execution efficiency of stored procedures is much higher than that of scattered SQL statements. As long as your database supports store procedure, you should use it as a data exchange channel between the website business logic end and the database end.

Records in the database are returned by PAGE instead of pages at the business layer.

When a large number of data records are returned, the paging mechanism should be used to display the data page by page. You need to display the data page on the database side. The paging mechanism at the business layer will cause a large amount of duplicate data to flow between the data layer and the business layer, this causes a performance bottleneck.

Use mature and optimized web page rendering technology

ASP. NET, PHP, JSP, Ruby, and CGI can all act as HTML rendering engines at the website presentation layer. You can select an appropriate platform based on your needs. Note that, for example, Asp. to meet the needs of the vast majority of application merge operations to minimize the amount of user code, a number of technologies that may reduce performance, such as view state, you can disable these functions to improve page rendering and execution efficiency. In fact, we use the direct render method in comsharp cms. Aside from the ASP. NET page lifecycle model, we directly render HTML code to generate webpages, which achieves ideal performance.

Use XHTML + external CSS + External JavaScript to reduce HTTP requests

You should modify the content, modifier, and behavior of the page separately. The content is pure XHTML, external CSS files, and external JavaScript files. The advantage of this model is that, the browser can cache external CSS and Javascript. Each time, you only need to request the XHTML content from the server side, which greatly reduces the page request size and greatly improves the performance.

Use clean code (XHTML, JavaScript, CSS)

Your HTML code, JavaScript, and CSS files must contain clean code, clean code, and W3C-compliant code. It is not only short, but also reduces the burden on the browser. The browser does not need to perform various Error Tolerance Analyses, the execution efficiency is greatly improved by completely outputting content according to the standard.

 

This article is provided by comsharp CMS official site

 

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.