Make WordPress Core

Opened 5 months ago

Last modified 5 months ago

#61978 new enhancement

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

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

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
5 months ago

  • Severity changed from major to normal
  • Version changed from 6.6.1 to 6.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
5 months ago

  • Type changed from defect (bug) to 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.