Chapter 2. Where to Measure Performance

Measuring speed is critical if we want to detect problems and improve performance. The first question to consider when talking about measurement is the target. Where should we measure?

Your first thought may be to measure on a desktop. There are several tools available for classic web performance optimization. However, as we saw in Chapter 1, mobile browsers, hardware, and networks are different. Therefore, measuring in a classic browser will lead to false ideas of performance.

Note

When measuring web performance on mobile devices, sometimes it’s not the absolute values that are the most important data, but the comparisons with different techniques and the relative differences when you are applying web performance optimization techniques. Because of all the differences in devices and environments, saying that your website can be loaded in 2 seconds on a cellular phone means nothing—it might be much slower on 2G networks, on unreliable 3G networks, or in some different mobile browsers.

Simulators and Emulators

Generally speaking, an emulator is a piece of software that translates compiled code from an original architecture to the platform where it is running. It allows us to run an operating system and its native applications on another operating system. In the mobile development world, an emulator is a desktop application that emulates mobile device hardware and a mobile operating system, allowing us to test and debug our applications ...

Get High Performance Mobile Web now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.