Warum man sich mit dem Thema Webperformance beschäftigen muss und drei einfache Tipps für schnellere Webseiten. Das Video zu diesem Vortrag finden Sie auf http://youtu.be/MT5S9T0DWrs
Jakob Nielsen’s book „Usability Engineering“ from 1993 Delay User reaction 0 - 100 ms Instant 100 - 300 ms Feels sluggish 300 - 1000 ms Machine is working… 1 s+ Mental context switch 10 s+ I’ll come back later…
Web Search Delay Experiment ● The cost of delay increases over time and persists ● Delays under half a second impact business metrics Source: https://www.igvita.com/slides/2012/webperf-crash-course.pdf
Beispiel - 3.19 sec. Browser Avg. Page Load Time (sec.) Iron 1.40 Internet Explorer 2.50 Firefox 3.06 Chrome 3.11 Amazon Silk 3.71 Safari 3.76 Maxthon 5.31 Opera 5.49 BlackBerry 6.34 Safari (in-app) 6.79
Download einer 58 kB Datei von einem US Ostküstenserver nach Frankfurt. Roundtrip Time: 80 ms Zeit client server 0 ms SYN --> <-- SYN,ACK 80 ms ACK --> GET --> <-- 10 TCP Segmente (14.600 Bytes) 160 ms ACK --> <-- 20 TCP Segmente (29.200 Bytes) 240 ms ACK --> <-- 40 TCP Segmente (15.592 Bytes) 320 ms ACK --> Downloadzeit einer 58 kB Datei: 320 ms
blink-dev thread ● Cable profile (5Mbps / 28 ms RTT) ● Main thread attribution in Blink o Measured via Telemetry ● 69.5% of time blocked on network ● 6.6% of time blocked JavaScript ● 5.1% blocked on Layout ● 4.5% blocked on Paint ● ... No surprises here... First page load is network (latency) bound! Top 1M Alexa sites... +Ilya Grigorik @igrigorik
Domain shard… all the things! 6 connections per origin just add more origins, right? Duplicate (spurious) data packets due to oversharding http://perf.fail/post/96104709544/zealous-sharding-hurts-etsy- performance Optimal number of shards? There is no such thing. Depends on particular page, device + network + network weather. Most sites overshard, and hurt themselves… Causing congestion, retransmissions, etc.
HTTP/2 ist noch nicht da und es ist es keine Wundermedizin. So bald es für alle verfügbar ist, wird sich allerdings wieder viel verändern. Dann ist z.B. die Anzahl der Dateien egal.