Replies: 4 comments 2 replies
-
@adamraine |
Beta Was this translation helpful? Give feedback.
-
In your case, the FCP being earlier in the page load would make users more likely to interact with the page sooner while the main thread is blocked which can increase interaction latency. Ultimately this is just a trade-off for you to decide which aspect of the user experience you want to optimize, interaction latency measured by TBT or perceived load time measured by FCP. You could also look into reducing the main thread blocking time in the new TBT window to optimize both. |
Beta Was this translation helpful? Give feedback.
-
Sure, I understand that TBT translates to the interaction latency. But I was trying to understand why is LH not penalizing apps for any blocking task that happens before FCP. I believe any blocking task prior to FCP could directly affect rendering of the page and hence could result in delayed paint metrics. So, irrespective of whether it happens before or after FCP, a blocking task is to be caught and LH should consider that in the final score. In cases like the above, such blocking tasks goes unnoticed and this results in a plethora of undesired cases like below
I believe we should start considering all the blocking tasks in the final score given by LH, not just the ones that happens after FCP |
Beta Was this translation helpful? Give feedback.
-
Having to rely on FCP to indirectly understand the presence of a blocking task could introduce a lot of ambiguity here. For example, i might not know for sure whether FCP was delayed because of a blocking task or because of some other reasons.
It makes sense to not count blocking tasks before FCP in the context of interaction delay. But in that case, may be we should think about replacing TBT with a new metric that combines these two sets of blocking tasks, one post FCP (today's TBT) and one pre FCP. Ignoring the pre FCP blocking task simply does not make sense here. |
Beta Was this translation helpful? Give feedback.
-
We operate a web application that runs within a native app's web view. Previously, the application used to load certain dynamic JavaScript chunks before the First Contentful Paint (FCP), thereby delaying the FCP value. To optimize performance, we transitioned to statically loading these chunks via HTML and serving them directly from the HTTP Cache (We've implemented internal mechanisms to ensure critical code remains in the cache). Surprisingly, this optimization led to a degradation in Total Blocking Time (TBT), despite successfully improving the FCP value
Here is an illustration of the trace that we gathered for before and after
What we could understand from this is that the overall blocking tasks remain consistent between the before and after versions. However, the distribution of these blocking tasks concerning the First Contentful Paint (FCP) point differs. In the after version, a greater portion of the blocking tasks occurs after the FCP point. Consequently, this shift has led to a higher Total Blocking Time (TBT) value in the after version, as TBT is measured from the FCP mark. Despite significantly enhancing the user experience, this change has resulted in a lower or nearly unchanged Lighthouse (LH) score for the after version.
So I believe, in addition to TBT, we should also have some way to indicate the Overall Blocking Time. Measuring the blocking time from the FCP mark alone might not tell the real story. A decrease in the blocking time prior to the FCP mark should reward the application here.
Beta Was this translation helpful? Give feedback.
All reactions