Make WordPress Core

Opened 2 years ago

Last modified 2 years ago

#61978 new enhancement

Managing Dynamic Search, Category Filtering, and Pagination for Bulk Patterns

Reported by: codersantosh Owned by:
Priority: normal Milestone: Awaiting Review
Component: REST API Version: 6.0
Severity: normal Keywords:
Cc: Focuses: rest-api, performance

Description

I noticed that the get_collection_params method and query filter function are not present in the get_items method of the WP_REST_Block_Patterns_Controller class. How can this be effective when registering a large number of patterns? Relying solely on the init hook and register_block_pattern may negatively impact site performance. There should be an alternative approach to registering patterns that can better handle dynamic search, filtering, and pagination for a large volume of patterns.

Change History (2)

#1 @hellofromTonya
2 years ago

  • Severity majornormal
  • Version 6.6.16.0

Hello @codersantosh,

Welcome back to WordPress Core's Trac.

I'm doing triage for 6.6.x cycle. No changes were made in this class in 6.6.1.

The class was introduced in 6.0.0. The get_items() method signature has not changed since first introduced via [53152].

Updating the Version to 6.0.0 to reflect when the method's signature was introduced.

Also lowering the severity to normal, given its not causing "major" errors / site breakages.

#2 @codersantosh
2 years ago

  • Type defect (bug)enhancement

Hello @hellofromTonya,

Thank you for your reply! I apologize, but upon further reflection, I realize I may have submitted the ticket incorrectly. This issue is more of an enhancement for future WordPress updates.

As WordPress dives deeper into the age of block patterns, we can expect a rise in developers creating and sharing their pattern libraries. However, there seems to be a lack of built-in tools for efficiently managing large collections of patterns. Currently, relying solely on the init hook and register_block_pattern function for pattern registration could negatively impact site performance.
This highlights the need for a more robust system for managing patterns within WordPress.

Note: See TracTickets for help on using tickets.