31 Followers
6 Following
106 Posts

And now it’s riddle time! What will the following code print and when will the DOM change be actually painted to the screen?
Bonus question: what will change (if anything at all) if you resolve the promise in 30ms instead of 10ms?

#webperf #webdevelopment

Hey #webperf!
I have no idea why @ChromeDevTools have only x4/x6 CPU Throttling settings, but my M1 Mac is too damn fast to cause long tasks even with x6.
It was so annoying that I developed a little extension for this. Still a little buggy but does the job🤘.
We all know what `defer` attribute on <script> tag means.
"the script is downloaded in parallel to parsing the page, and executed after the page has finished parsing".
So we naively place this attribute on non-critical scripts.
And this might be a problem 👇 (1/6)
#webperf
Retweeting it again since there is one important thing I missed 🤦‍♂️.
You have to enable "Timeline: event initiators" experiment in DevTools Settings -> Experiments if you want it to work.
Once enabled you'll be able to see the arrow (and follow it to find the culprit).
#webperf
---
RT @malchata
This is a super cool little thing I found that was added recently to the performance profiler in Chrome DevTools. If you click on any "Recalcul…
https://twitter.com/malchata/status/1633847519720423426
Tweet / Twitter

Twitter

This alone was worth all the time I spent on this article.

1. If you enjoy someone's work - let them know, it's really incentivizing.
2. If you didn't read the article - give it a go, you might learn a few things about #webperf, #javascript and #webpack.

Love the statement 😅.
A nice read by @DebugBear on how @____lighthouse simulated network throttling compares to @ChromeDevTools and system-level throttling:
https://www.debugbear.com/blog/network-throttling-methods.

#webperf

Network Throttling: DevTools vs. Lighthouse vs. Netem | DebugBear

Synthetic testing tools throttle the network to simulate consumer devices. Learn how different network throttling methods impact the resulting performance metrics.

So according to @addyosmani and this article https://web.dev/optimizing-content-efficiency-javascript-startup-optimization/ you should see it if you enable experimental feature `Timeline: V8 Runtime Call Stats on Timeline`. I did just that and nothing changed. Is this still a thing? Does it work for anyone else?
JavaScript Start-up Optimization

Keep your network transmission and parse/compile cost for JavaScript low to ensure pages get interactive quickly.

web.dev
Apparently, in @ChromeDevTools there is a way to break down the "Compile Code" phase into "Compile" and "Parse".
The only problem is that it doesn't work 😕.
#webperf
One of the most interesting findings about #webperf in Web Almanac 2022 is what percentage of websites will stop passing CWV assessment if (or should I say when) INP replaces FID.
That's... Intimidating🫢.
Using React? Better go fix some long tasks.
Working on something, guess what it is (obviously long tasks but what exactly?) 🙃
#webperf