Make WordPress Core

Opened 4 months ago

Closed 3 months ago

Last modified 3 months 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: 6.6
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 months 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 months 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 months ago

  • Keywords needs-unit-tests added

@ellatrix commented on PR #6673:


3 months 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 months 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:


3 months 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:


3 months ago
#8

@anton-vlasenko Added unit tests

#9 @ellatrix
3 months ago

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

#10 @ellatrix
3 months ago

  • Milestone changed from Awaiting Review to 6.6

#11 @desrosj
3 months 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.