first HTML document nearly 20 years ago. • Development head and front-end developer at • Facebook Developers Circle Cairo Lead. • Organizer at EgyptJS • Web standards and Accessibility fanatic. @ahmadalfy
service we call CTO as a service. • Part of my job was evaluating and profiling a lot of applications and products developed by others. I quickly fell in love with performance audits and investigations.
Touch to move < 16 ms Each frame completes in < 16 ms Main thread JS work complete < 50 ms / chunk Ready to use < 1000 ms https://developers.google.com/web/fundamentals/performance/rail#ux
we’re still using • It suffers from a lot of problems like latency and limitations on transfer size and number of requests. • BUT We were able to overcome that
page is completely blocked. This is because of a phenomenon called “Progressive Rendering”. Without it, you will see content shifting and changing their style while the assets are being downloaded. • Inline CSS is an exception, it will render immediately after loading.
element uses a font that is a part of the render tree and contain text. • This results in the phenomena we call Flash of Unstyled Text and Flash of Invisible Text
standard Page Speed Insights. Available in Google Chrome under the tab “Audit” in the DevTools. You can use it to emulate slower network connection or a slow CPU. Available as a command line interface.
the one in the DevTools, can run in headless mode as well. • Isn’t affected by the extensions you have on your Chrome setup. • Save the results in an HTML document with the exact time, date and version of the lighthouse API. • Can be integrated with your CI.
a term commonly used to describe a technique where we stop image loading until it is visible in the user’s viewport. • It is used heavily in listing to: • Improve user experience • Save the bandwidth
origin, it will attempt to open a TCP connection to that new origin to retrieve the data. This technique works by telling the browser ahead that it needs to connect to the following list of origins so that when the browser react the request, most of the handshaking, DNS lookup and the other network stuff have been taken care of
block the main thread while downloading. The old practice was to move the stylesheet to the top and move the scripts to the bottom. The new recommendation is to inline the CSS used for the critical part (above the fold) and move everything else to the bottom. Scripts should also use the attribute defer or async.
font is downloaded or it pass the timeout phase of the font loading. We can control the behavior of the font using the property font-display to eliminate the font swapping period and always use a fallback font.
visits load. The problem usually arise from third party scripts that have short cache lifetime by default (like GTM, GA … etc) We can always rely on cache busting mechanisms to invalidate the cache
Problems usually arise in: • Huge content websites with significant DOM nodes • Using inline SVGs • Serving content for both mobile and desktop and using display none to hide nodes on any platform
well and should be properly sized and encoded • If a video is used for presentation only, test the internet connection speed and remove it if it isn’t loading
an eBook by Addy Osmani. • Web.Dev; huge resource by Google • Books: High Performance Websites, Even Faster Web Sites. Both by by Steve Souders • Web performance made easy (Google I/O '18)