I've noticed that since the 13th of May, the Time to Interactive metric reported by Lighthouse on my website has increased quite dramatically. After a bit of investigation, I found this in the waterfall (trimmed down for a quicker overview):
You can see the JS execution occupying the main thread completely, coincides with the execution time of the GA script.
I'm puzzled by the time it takes to execute the script, but mostly because I haven't changed anything about the way it loads or executes, so I expected this to be a common issue, yet I haven't been able to find reports similar to mine. So I was wondering if anyone else has experienced similar problems? Do you know the reason behind this behaviour?
I can't think of any applicable code snippet to attach, but:
- the GA script is loaded in the head of the page
- no (significant) front-end changes have been made to the page directly before the issue started occurring, so I don't expect to have broken it myself :)