#60620 closed defect (bug) (fixed)
Twenty Twenty-Four: Remove pattern from home template to improve performance
Reported by: | onemaggie | Owned by: | SergeyBiryukov |
---|---|---|---|
Milestone: | 6.6 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Bundled Theme | Keywords: | has-patch commit |
Focuses: | Cc: |
Description (last modified by )
This PR removes the pattern from the home template and instead replaces it directly with its contents.
This was introduced in [this PR](https://github.com/WordPress/twentytwentyfour/pull/486). Creating the pattern was needed to solve what the PR was stating (we need the Home Business pattern to show on the template replacement flows) but we don't need to use it in the template, and the code repetition (which is minor) is better than having to do a an extra pattern replacement.
To test this PR, check that the home page is unchanged and that creating a new template still shows the home page pattern (by creating a template for the front page, for example)
Change History (15)
This ticket was mentioned in PR #6170 on WordPress/wordpress-develop by @onemaggie.
8 months ago
#1
- Keywords has-patch added
#2
@
8 months ago
@youknowriad @richtabor We discussed this, if you would have a look at the patch I'd appreciate it
#3
follow-up:
↓ 4
@
8 months ago
Please include a ticket description and a summary of the mentioned discussion.
#4
in reply to:
↑ 3
;
follow-up:
↓ 8
@
8 months ago
Replying to poena:
Please include a ticket description and a summary of the mentioned discussion.
I didn't add it to the ticket because the bot already copies from GH, is it better to duplicate? I never know what is the way to go
#8
in reply to:
↑ 4
@
8 months ago
Replying to onemaggie:
Replying to poena:
Please include a ticket description and a summary of the mentioned discussion.
I didn't add it to the ticket because the bot already copies from GH, is it better to duplicate? I never know what is the way to go
Please refer tp the contributors handbook at https://make.wordpress.org/core/handbook/contribute/#submitting-tickets
All contributors should clearly describe what a ticket is about, even if it's a ticket meant to accompany a pull request submitted on the GitHub repository. Tickets should precede pull requests or patches. That's important in a collaborative open source project to:
- Allow broader discussion on the proposed change.
- Document the history of the project: Trac represents the history of WordPress. Ten years from now, anyone should be able to search Trac to understand why and when a change was made.
@youknowriad commented on PR #6170:
7 months ago
#9
This is looking good to me, probably best to commit it after 6.5
@onemaggie commented on PR #6170:
6 months ago
#10
Now is after 6.5, should we merge this?
#12
@
6 months ago
- Owner set to SergeyBiryukov
- Resolution set to fixed
- Status changed from new to closed
In 57945:
@SergeyBiryukov commented on PR #6170:
6 months ago
#13
Thanks for the PR! Merged in r57945.
#14
follow-up:
↓ 15
@
6 months ago
How does this actually improve performance? Are there any numbers?
#15
in reply to:
↑ 14
@
6 months ago
Replying to swissspidy:
How does this actually improve performance? Are there any numbers?
By not having to resolve the pattern, the template loads faster, but we haven't measured by how much. Since the pattern isn't serving any function (utility or otherwise) there is no reason for the extra step
This PR removes the pattern from the home template and instead replaces it directly with its contents.
This was introduced in this PR. Creating the pattern was needed to solve what the PR was stating (we need the Home Business pattern to show on the template replacement flows) but we don't need to use it in the template, and the code repetition (which is minor) is better than having to do a an extra pattern replacement.
To test this PR, check that the home page is unchanged and that creating a new template still shows the home page pattern (by creating a template for the front page, for example)
Trac ticket:
https://core.trac.wordpress.org/ticket/60620