Make WordPress Core

Opened 2 years ago

Last modified 2 years ago

#61405 new defect (bug)

Residual of block found in `get_blocks_metadata` even when block is unregistered using `unregister_block_type()`.

Reported by: thekt12 Owned by:
Priority: normal Milestone: Awaiting Review
Component: Editor Version:
Severity: normal Keywords: has-patch
Cc: Focuses: performance

Description

The get_blocks_metadata() function retrieves all registered blocks using WP_Block_Type_Registry::get_all_registered(). It updates its internal static variable with new blocks but does not account for blocks that have been unregistered. Consequently, residual blocks remain in the static variable and are processed in functions consuming get_blocks_metadata(), such as wp_add_global_styles_for_blocks. This oversight can lead to unnecessary processing overhead.

Change History (5)

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


2 years ago
#1

  • Keywords has-patch added

#2 @sabernhardt
2 years ago

  • Component GeneralEditor

#3 @thekt12
2 years ago

  • Focuses performance added

This ticket was mentioned in Slack in #core-performance by thekt12. View the logs.


2 years ago

This ticket was mentioned in Slack in #core-performance by mukeshpanchal27. View the logs.


2 years ago

Note: See TracTickets for help on using tickets.