Make WordPress Core

Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#61228 closed enhancement (fixed)

Backport: Templates perf: resolve patterns server side

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

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:


2 years 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.


2 years 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
2 years ago

  • Keywords needs-unit-tests added

​@ellatrix commented on ​PR #6673:


2 years 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:


2 years 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 years 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 years ago
#8

@anton-vlasenko Added unit tests

#9 @ellatrix
2 years ago

  • Owner set to ellatrix
  • Resolution → fixed
  • Status new → closed

#10 @ellatrix
2 years ago

  • Milestone Awaiting Review → 6.6

#11 @desrosj
2 years 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.