Skip to content

Conversation

@westonruter
Copy link
Member

Summary

Fixes #1928
This reverts #1905

Relevant technical choices

An alternative to this is #1924 which keeps the code to gzip-compression the URL Metric in the codebase, but just disables it by default. However, since I found that Safari and Firefox always fail to send a URL Metric at pagehide when compression is involved, and Chrome also usually fails as well, it seems better to remove this code since it is not safe to use currently. Hopefully this revert can be reverted so we can benefit from gzip compression again!

@westonruter westonruter added [Type] Bug An existing feature is broken [Plugin] Optimization Detective Issues for the Optimization Detective plugin skip changelog PRs that should not be mentioned in changelogs labels Mar 16, 2025
@westonruter westonruter requested a review from felixarntz as a code owner March 16, 2025 16:19
@github-actions
Copy link

github-actions bot commented Mar 16, 2025

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: westonruter <[email protected]>
Co-authored-by: b1ink0 <[email protected]>
Co-authored-by: felixarntz <[email protected]>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@codecov
Copy link

codecov bot commented Mar 16, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 71.20%. Comparing base (47eef00) to head (b92b042).
Report is 3 commits behind head on release/2025-03-17.

Additional details and impacted files
@@                  Coverage Diff                   @@
##           release/2025-03-17    #1929      +/-   ##
======================================================
- Coverage               71.39%   71.20%   -0.19%     
======================================================
  Files                      86       86              
  Lines                    7043     6998      -45     
======================================================
- Hits                     5028     4983      -45     
  Misses                   2015     2015              
Flag Coverage Δ
multisite 71.20% <100.00%> (-0.19%) ⬇️
single 40.69% <0.00%> (+0.26%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

@b1ink0 b1ink0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test case should be removed.

'invalid_decoded_json_body_content_length' => array(
'params' => array_merge(
$valid_params,
array(
// Fill the JSON with more than 1MB of highly compressible data.
'elements' => array(
array_merge(
$valid_element,
array(
'xpath' => sprintf( '/HTML/BODY/DIV[@id=\'%s\']/*[1][self::DIV]', str_repeat( 'A', MB_IN_BYTES ) ),
)
),
),
)
),
'expected_status' => 413,
'expected_code' => 'rest_content_too_large',
),

@westonruter westonruter changed the base branch from trunk to release/2025-03-17 March 16, 2025 19:40
Copy link
Member

@felixarntz felixarntz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @westonruter for catching that.

It's a bummer this needs to be reverted, but we can hopefully reinstate it soon. This is something we can maybe reconsider post-1.0.0, as I don't anticipate it changing the API in any significant way.

I personally agree with your point from the ticket that we should eventually reintroduce this, despite the negative impact on BFCache for users where URL metrics are collected.

@westonruter westonruter merged commit aef2e8d into release/2025-03-17 Mar 17, 2025
22 checks passed
@westonruter westonruter deleted the revert/url-metric-gzip-compression branch March 17, 2025 15:46
b1ink0 added a commit to b1ink0/performance that referenced this pull request Mar 27, 2025
…etric-gzip-compression"

This reverts commit aef2e8d, reversing
changes made to 47eef00.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Plugin] Optimization Detective Issues for the Optimization Detective plugin skip changelog PRs that should not be mentioned in changelogs [Type] Bug An existing feature is broken

Projects

None yet

Development

Successfully merging this pull request may close these issues.

URL Metric compression during pagehide event results in no storage request

4 participants