Skip to content

Conversation

@b1ink0
Copy link
Contributor

@b1ink0 b1ink0 commented Apr 28, 2025

Summary

Fixes #1633

Relevant technical choices

Introduce PERFLAB_PLACE_OBJECT_CACHE_DROPIN constant to opt-in to placing the Server-Timing object-cache.php drop-in.

@b1ink0 b1ink0 added [Type] Enhancement A suggestion for improvement of an existing feature [Plugin] Performance Lab Issue relates to work in the Performance Lab Plugin only labels Apr 28, 2025
@b1ink0 b1ink0 added this to the performance-lab n.e.x.t milestone Apr 28, 2025
@codecov
Copy link

codecov bot commented Apr 28, 2025

Codecov Report

Attention: Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 72.50%. Comparing base (ff8b62b) to head (922212d).
Report is 131 commits behind head on trunk.

Files with missing lines Patch % Lines
plugins/performance-lab/load.php 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##            trunk    #1996      +/-   ##
==========================================
- Coverage   72.51%   72.50%   -0.02%     
==========================================
  Files          85       88       +3     
  Lines        7023     7146     +123     
==========================================
+ Hits         5093     5181      +88     
- Misses       1930     1965      +35     
Flag Coverage Δ
multisite 72.50% <50.00%> (-0.02%) ⬇️
single 40.14% <50.00%> (-0.20%) ⬇️

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.

@b1ink0 b1ink0 marked this pull request as ready for review May 9, 2025 06:13
@github-actions
Copy link

github-actions bot commented May 9, 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: b1ink0 <[email protected]>
Co-authored-by: felixarntz <[email protected]>
Co-authored-by: mukeshpanchal27 <[email protected]>
Co-authored-by: westonruter <[email protected]>

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

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.

@b1ink0 Thanks for the PR! Basically looks good to go, just a few nit-picks that would be great to address before merge.

global $wp_filesystem;

// Bail if the drop-in is not enabled.
if ( ! defined( 'PERFLAB_PLACE_OBJECT_CACHE_DROPIN' ) || ! PERFLAB_PLACE_OBJECT_CACHE_DROPIN ) {
Copy link
Member

Choose a reason for hiding this comment

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

Nit-pick: Maybe move this below, either right before or right after the PERFLAB_DISABLE_SERVER_TIMING clause? Since it's more closely related to that check.

It would also be great if you could update the comment above PERFLAB_DISABLE_OBJECT_CACHE_DROPIN, to clarify that it's maintained only for backward compatibility.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done in f492eed

@b1ink0 b1ink0 requested a review from felixarntz May 9, 2025 18:21
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 @b1ink0!

@felixarntz felixarntz merged commit b0310ee into WordPress:trunk May 20, 2025
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Plugin] Performance Lab Issue relates to work in the Performance Lab Plugin only [Type] Enhancement A suggestion for improvement of an existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Consider alternative to using object-cache drop-in to implement early Server-Timing

3 participants