-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Negative overallSavingsMs
for prioritize-lcp-image
#16261
Comments
Are these HTTP Archive numbers? One bit of information that may or may not help your efforts: some of these won't be simulation errors, but request identification errors, since both the main resource and the LCP request are identified by URL, not by request ID. #16213 has a smaller issue with this: it's really only a problem when observed and simulated TTFBs are very different, which isn't a problem for HTTP Archive numbers since it only uses observed, except when a page contains itself as an iframe, in which case Two other possible issues I remember:
|
Oh yeah, so the practical suggestion :) Maybe add an additional filtering step or boolean column(s) for when there are multiple requests on that page for the main resource or the LCP resource, could save some debugging time. |
Yes. This came up when I was researching the impact of the "Image Prioritizer" plugin from the WordPress Performance Team. I was trying to use the This plugin aims to improve the accuracy of both setting a high fetchpriority for the LCP image as well as lazy loading all other images. WordPress already attempts to do this server-side semantics, the plugin adds client side data to improve the accuracy. I also tried the For refrerence, here is the query I used to get URLs with negative values for SELECT
date,
client AS device,
page,
IF(IS_CMS(technologies, 'Image Prioritizer', ''), TRUE, FALSE) AS has_image_prioritizer,
CAST(JSON_EXTRACT(lighthouse, '$.audits.prioritize-lcp-image.details.overallSavingsMs') AS FLOAT64)
AS overallSavingsMs,
FROM
`httparchive.all.pages`
WHERE
date = '2024-10-01'
AND IS_CMS(technologies, 'WordPress', '')
AND is_root_page = TRUE
AND CAST( JSON_EXTRACT(lighthouse, '$.audits.prioritize-lcp-image.details.overallSavingsMs') AS FLOAT64) < 0
ORDER BY date DESC
LIMIT 1000 Note the CREATE TEMPORARY FUNCTION IS_CMS(
technologies ARRAY<STRUCT<technology STRING, categories ARRAY<STRING>, info ARRAY<STRING>>>,
cms STRING,
version STRING)
RETURNS BOOL
AS (
EXISTS(
SELECT * FROM UNNEST(technologies) AS technology,
UNNEST(technology.info) AS info
WHERE
technology.technology = cms
AND (
version = ''
OR ENDS_WITH(version, '.x')
AND (STARTS_WITH(info, RTRIM(version, 'x')) OR info = RTRIM(version, '.x'))
OR info = version)
)
); |
@connorjclark - I proposed a fix in #16276, let me know what you think! |
For prioritize-lcp-image, here are a 1000 urls that had a negative value for this audit.
https://gist.github.com/connorjclark/b00be94efc91fe67d1c6c9e3f7c13696
source 🔒
The text was updated successfully, but these errors were encountered: