The cost of JavaScript in 2019Published 25 June 2019 · Tagged with internals parsingNote: If you prefer watching a presentation over reading articles, then enjoy the video below! If not, skip the video and read on.Long Tasks that can keep the main thread busy and can push out how soon pages are interactive. Post-download, script execution time is now a dominant cost.Avoid large inline scripts (as they’re still parsed and compiled on the main thread). A good rule of thumb is: if the script is over 1 kB, avoid inlining it (also because 1 kB is when code caching kicks in for external scripts).Why does download and execution time matter? #Why is it important to optimize download and execution times? Download times are critical for low-end networks. Despite the growth in 4G (and even 5G) across the world, our “Parsing JavaScript in zero* time” as presented by Leszek Swirski at BlinkOn 10.How do these changes reflect what you see in DevTools? #In addition to the above, there was // replace the first image we see with a cat document.images[0].src = 'http://thecatapi.com/api/images/get?format=src&type=gif'; // replace the google logo with a cat document.getElementById('lga').innerHTML = ''; Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life! Check out: eBank.nz (Art Generator) | Netwrck.com (AI Tools) | Text-Generator.io (AI API) | BitBank.nz (Crypto AI) | ReadingTime (Kids Reading) | RewordGame | BigMultiplayerChess | WebFiddle | How.nz | Helix AI Assistant