Problem/Motivation
#3395776: Make POST requests render cacheable didn't show as much of a performance improvement as you'd expect in StandardPerformanceTest, because the standard profile with no content doesn't have much to render.
Steps to reproduce
Proposed resolution
Couple of options:
1. Move login testing to umami which already has some content. This would require enabling the login block in the Umami test (but we also do that in the standard test, it's just not 'pure' Umami to have it enabled).
2. Add ten nodes instead of one to the standard front page so that more rendering happens.
We could also add a test that submits the wrong password for a user so that the login block fails validation, this will cause the entire page to be rendered without a redirect - and is quite important for user-facing performance that this comes back quickly, may affect 'interation to next paint'/INP etc.
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
| Comment | File | Size | Author |
|---|
Issue fork drupal-3426303
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3426303-11x
changes, plain diff MR !16951
- 3426303-improve-the-standard
changes, plain diff MR !16655
Comments
Comment #2
kristiaanvandeneyndeIf we start moving more tests to the Umami tests, we might lose track of what the performance of a "clean" Drupal is. Would it make sense to have the same tests run where one is using "demo_umami" and the other is using "standard"? Then with any change to core we can see how it improves performance on a very minimalistic site vs a very realistic one.
Comment #3
catchGiven the install profile is a property on the test class it'd probably be easier to duplicate the coverage (or add an extra trait with the test methods), but we can definitely do that and agree it's good to test both cases at least for things that are different. Reminds me we need to add query/cache assertions to all the Umami performance tests now that counts are stabilised etc.
Comment #4
kristiaanvandeneyndeI think I did the query part already for those tests that were previously checking query counts.
Comment #5
wim leers👀
Comment #7
catchRe-titling.
I think for login testing we don't need coverage between standard and Umami, just the one should be enough. We should keep some testing of a minimal install though and that's being figured out in #3608939: Move/split remaining parts of StandardPerformanceTest and StandardJavascriptTest
Comment #9
catchComment #10
berdirComment #11
catchRealised the login test isn't compatible with the OpenTelemetry dashboard because that relies on LCP/TTFB which don't work for multi-request tests, and which is populated via this test. But I think we can move the logic to an UmamiLoginPerformanceTest instead.
I guess the question is whether the form itself causes some kind of caching issue by being on the page, but the vast majority of sites these days have a login link rather than a block on every page. So yeah I think it's OK to drop. We found some interesting things via the login test itself but that should be the same (more or less) however it happens.
Comment #12
catchAlso building on #11, the 'across pages' tests in OpenTelemetryPerformanceTest also don't really make much sense on the dashboard either. So I think we should go for an UmamiMultipleRequestsPerformanceTest that handles visiting multiple pages, and also logging in which happens across multiple requests.
Comment #13
catchRebuilt the branch/MR here.
- new MultipleRequestsPerformanceTest so that we don't send not-useful things to the open telemetry/gander dashboard
- moved login testing from standard to that new class
Comment #14
berdirReviewed.
Comment #15
catchI think I got all of the review points.
Comment #16
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #17
catchComment #18
berdirLooks good to me. I'm not entirely sure this fully this covers the original idea of testing render caching on post requests, we have some render cache hits, less than standard though. No unexpected queries from something like a views block, but not sure we'd get that on the dedicated login page anyway.
But more importantly now, this is part of #3608939: Move/split remaining parts of StandardPerformanceTest and StandardJavascriptTest and moves one of the last bits from StandardPerformanceTest, making it less weird.
Comment #19
amateescu commentedLeft a few comments on the MR.
Comment #20
catchResolved the comments I think. All trivial changes so moving back to RTBC.
Comment #21
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. The merge request has merge conflicts and cannot be merged. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #22
catchRebased again.
Comment #24
amateescu commentedCommitted and pushed e880b4dac7c to main. Thanks!
Needs a rebased MR for 11.x.
Comment #25
berdirI think this is not correct now. You renamed the identifier but not the file, Right now it will not fail on a non-existing file and generate it, also on CI. We could change that to always require the UPDATE constant also if the file doesn't exist yet, it was mostly just a convenience thing while I set it up.
Comment #27
catchThe file was renamed in the MR already but somehow the identifier in the test got out of sync later so I think it's actually OK? Or I'm missing something.
Put up an 11.x backport.
Comment #28
catchMoving to RTBC for the backport. We still might need a follow-up for main if my answer to @berdir is wrong.
Comment #29
berdirYou are correct, the final state seems correct, then it was just not inbetween. I've created #3620550: Only update performance test assertion files if environment variable is set anyway.
Comment #31
amateescu commentedCommitted 00de18c and pushed to 11.x. Thanks!