Today, I used the Safari web inspector to analyze how long it actually takes to evaluate jQuery Mobile, a common framework used for mobile web development.
For evaluation, we used the jQuery Mobile demo page for version 1.2.1.
Below are the results. We evaluated, in order, my MacBook Air with a 1.7GHz Intel Core i5 (Mac OS X 10.8.3), my iPhone 5 (iOS 6.1.3) and my iPhone 4S (iOS 6.1.3).
MacBook Air 1.7GHz Intel Core i5
- jquery-1.7.1.min.js – 10.7ms
- jquery.mobile-1.2.1.js – 31.5ms
- jquery-1.7.1.min.js – 41.7ms
- jquery.mobile-1.2.1.js – 144ms
- jquery-1.7.1.min.js – 65.7ms
- jquery.mobile-1.2.1.js – 238ms
The total latency of evaluating jQuery Mobile (jquery.min.js + jquery.mobile.js) was 42.2ms for the MBA, 186.1ms for the iPhone 5, and 303.7ms for the iPhone 4s.
Network latencies for a good broadband WiFi connection are about 50ms. For a 3G connection, they are a few hundred ms.
Server latencies can depends a lot on the complexity of the page you wish to display, but can be anywhere between a few ms to a few seconds. We generally try to keep server latency less than 300ms, and for most pages, less than 100ms.
Whereas latencies of 100ms appear to be almost instantaneous to humans, response times of more that 300ms are very noticeable and negatively impact perceived responsiveness.