Make WordPress Core

Opened 5 weeks ago

Closed 2 weeks ago

Last modified 3 days ago

#61228 closed enhancement (fixed)

Backport: Templates perf: resolve patterns server side

Reported by: ellatrix's profile ellatrix Owned by: ellatrix's profile ellatrix
Milestone: 6.6 Priority: normal
Severity: normal Version: trunk
Component: Editor Keywords: has-patch needs-unit-tests
Focuses: Cc:

Description

Original PR: https://github.com/WordPress/gutenberg/pull/60349

To prevent pattern fetching on editor load, and replacing pattern blocks on render, resolve the pattern block server side. This resulted in a 6% performance improvement for pattern loading in the Gutenberg plugin.

Change History (11)

@ellatrix commented on PR #6559:


3 weeks ago
#2

Closing and reopening since I didn't make this PR from my fork.

This ticket was mentioned in PR #6673 on WordPress/wordpress-develop by @ellatrix.


3 weeks ago
#3

Trac ticket: https://core.trac.wordpress.org/ticket/61228

To test: check the patterns endpoint and search for wp:pattern. There should be 0 results.

https://github.com/WordPress/wordpress-develop/assets/4710635/63b268b2-d0e3-48ce-a52d-506a4de39e30

#4 @swissspidy
3 weeks ago

  • Keywords needs-unit-tests added

@ellatrix commented on PR #6673:


3 weeks ago
#5

@anton-vlasenko Yes, it needs unit tests, but I'm unfamiliar with unit test in PHP and core. Would you be able to assist?

@antonvlasenko commented on PR #6673:


3 weeks ago
#6

@anton-vlasenko Yes, it needs unit tests, but I'm unfamiliar with unit test in PHP and core. Would you be able to assist?

Yes, I can look into it.

@ellatrix commented on PR #6673:


2 weeks ago
#7

By the way, I noticed that the $inner_content function argument might not be necessary because it seems to only pass information that's already in the $blocks function argument.

I inline commented on that, it is necessary to change because serialise will break if it's not adjusted

@ellatrix commented on PR #6673:


2 weeks ago
#8

@anton-vlasenko Added unit tests

#9 @ellatrix
2 weeks ago

  • Owner set to ellatrix
  • Resolution set to fixed
  • Status changed from new to closed

#10 @ellatrix
13 days ago

  • Milestone changed from Awaiting Review to 6.6

#11 @desrosj
3 days ago

In 58408:

Coding Standards: Apply changes after running composer format.

This applies several formatting related changes made while running composer format.

Follow up to [55720], [58171], [58271], [58282], [58283], [58292], [58299], [58303], [58332].
See #51857, #60719, #60895, #61021, #61118, #61228, #61276, #61324.

Note: See TracTickets for help on using tickets.