-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Add WP_DEVELOPMENT_MODE
constant plus related filter and function
#4565
Add WP_DEVELOPMENT_MODE
constant plus related filter and function
#4565
Conversation
@felixarntz Thanks for the PR! Wondering if Any other constants and "shortcuts" that may make sense to be set for dev. mode? |
I think for For the other suggestions, I would suggest to handle that separately since those would be changes that require more discussion. Any of those changes we could have also made e.g. during introduction of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Using a PHP global to make testing possible seems better than using a filter.
Committed via https://core.trac.wordpress.org/changeset/56042 🎉 |
@felixarntz @azaozz I've noticed the metric "server time (total) for block themes" has improved dramatically after this change: Is this expected? Could you elaborate why this happens? I'd be super excited if this is a real improvement :) |
@oandregal Interesting. This change by itself is 100% not impacting performance. So question is why did the number change so much? My first hunch is that we may be running the performance tests with WP_DEBUG enabled?? If yes, that would explain it, since before this change WP_DEBUG prevented caching on several block theme relevant functions, which was always something we wanted to change, and did here. So basically now the caches are enabled also if WP_DEBUG is enabled, so that may make things seem faster in the metrics, but really there's no difference. Those are effectively the WP 6.2 performance wins only showing up now 😁 Would be good to validate that the above is in fact the case. Are we running performance tests with WP_DEBUG? |
Looking at the CI job, I can learn that ImageMagic supports 247 formats, though I am unable to find the values of The performance workflow doesn't seem to set anything different from the defaults, hence, it sounds I'd appreciate if someone with more experience in GitHub CI/wp-env than I have could double-check this. |
Actually, scratch what I said above: I thought WordPress core used |
The values from that .env file are only used for the initial install (afaik). The actual |
@oandregal Interesting, I just spotted that the numbers on https://www.codevitals.run/project/wordpress all went back up again a few commits later. Any idea why? Maybe that wasn't related to this commit at all? 🤔 |
@felixarntz note there were two drops and one uptick. The metrics haven't recovered from the first drop and it points to this PR: I think it's related. Both core and Gutenberg had |
@oandregal Ah my bad, thanks for clarifying, I somehow missed that there were 2 drops like that. |
@felixarntz @azaozz any progress on why this PR affected TTFB? Also, making sure we use production environment values would be important. I'm happy to create a trac issue for this if that's preferred. |
@oandregal I thought it was #4565 (comment)? If the tests are run with |
@felixarntz and @oandregal, I'm just catching up on this conversation and confirmed that the Performance GH workflow in the core repo uses the docker environment bundled in Core, rather than the I think a bit of investigation into why each of those large shifts in performance numbers were recorded, would be useful. It seems like the initial drop was indeed caused by the addition of |
Ticket created: https://core.trac.wordpress.org/ticket/58825 |
This PR implements a proposed path forward for the below ticket and also applies it in a first usage, replacing the somewhat misused
WP_DEBUG
lookups to modify theme.json caching behavior.Tests still need to be added.
Trac ticket: https://core.trac.wordpress.org/ticket/57487
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.