What does quick browser mean? (1)

Source: Internet
Author: User

BKJIA: This article describes the factors that affect the speed of a browser and how to determine whether a browser is fast. Evan Martin, author of this article, is a developer of the Google Chrome project. His article is from his personal blog and has nothing to do with Google's official website. The original compilation is as follows:

What does quick browser mean? In fact, this is a very difficult problem. I was invited to discuss this issue at the recent Ubuntu developer Summit and wrote this article to supplement it.

Benchmark Test

Many people will first consider benchmarking. Tech media loves Benchmark Testing because it provides numbers to depict beautiful comparison charts. However, in essence, benchmarking measures very specific parameters and can only be used to simulate the process that users may experience. The most important benchmark test of a browser is JavaScript benchmark. However, although no one would deny the importance of JavaScript, JavaScript is not the decisive factor in the loading speed of most simple web pages. I think the improvements made to the JavaScript engine are mainly aimed at the sites to be created in the future, such as the JavaScript NES simulator. Of course, there is not much site like Gmail that greatly benefits the rapid JS engine.

The conclusions drawn through JavaScript benchmarking are often boring. For example, "Wine achieves Mozilla faster than Linux compiled Mozilla, so Mozilla does not pay much attention to Linux ". The JavaScript benchmark test is capable of drawing such a lack of guidance, and the fact is that the browser's JavaScript implementation code is almost identical on every platform! The speed difference in the above test may be due to different compiler quality, so the difference between Mozilla and other cross-platform browsers should also be seen. Such a comment is boring at all levels. First, there is no basis for this conclusion. Second, JavaScript benchmarking is designed to be unrelated to the platform. Finally, these benchmarking tests do not even test the code specific to each platform.

The new benchmark is attempting to overwrite content other than JavaScript. Dromaeo is a good example. Some of the tests are for DOM. However, we should be careful with third-party benchmarking! Fortunately for Dromaeo, its author John is more in-depth than most other browser developers in understanding Web development, but I am not at ease with others. Writing a seemingly good performance test is not difficult, but it is not necessarily useful. For example, there is a piece of content in the SunSpider 0.9.1 release statement, a bug related to the interaction between the test framework and energy management. You should know that the author involved in this bug is an experienced browser developer, rather than any Web development enthusiast.

Cycle timing

A better measurement method may be to observe the performance of loading a real web page from the beginning to the end of the browser. This process involves the JavaScript engine and other components: HTML parsing, font measurement, and so on. We and Mozilla, I think other browser vendors should also have) There are test tools for local pages. For third-party testers, it is natural to use these tools to test and compare the loading speed of browsers. The only difference is that their testing objects are real webpages, such as the Yahoo homepage ), the test results are often copyrighted and cannot be made public. As far as I know, our test pages are set to private, and I only find such a page in Mozilla ).

To ensure that the test data can be reproduced, the usual test method is to read a page file from the Local Computer, instead of reading and loading BKJIA editors from the network. Note: Do you remember the Google Video for cutting potatoes? Careful Netizens found that the test page in the video is a local address, which is actually a common practice of browser speed testing ). No network speed is included in the benchmark tests currently discussed. This is a pity, because it is a very interesting field. For example, how different browsers use different single host connection restrictions, or how Chrome performs DNS pre-read at startup this DNS pre-read behavior is actually more affected than any Web rendering or JS processing. You can enter about: dns in Chrome for further understanding ).

 

In addition to the network speed, there are still other aspects that affect the browser performance, such as the network protocol layer and cache. I remember that at the early stage of Chrome development, Mike or Nagle once found a network layer bug, which caused Chrome to read web pages more quickly than IE. None of the above tests present the effect of this bug. In addition, the time taken to display pixels on the screen can also be counted as a link. Gmail loading is even more of a crazy multi-process. In addition to common JavaScript and rendering steps, this process also contains several redirection and progress bars. As far as I know, there seems to be no tests for Gmail loading speed.


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.