Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #59383, comment 10


Ignore:
Timestamp:
09/25/2023 10:58:42 AM (9 months ago)
Author:
gziolo
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #59383, comment 10

    initial v1  
    22
    33Do you think we should also compute the result of processing all registered blocks once and cache it? `get_hooked_blocks` is going to be called multiple times on every page that is served using each theme template shipped with the theme. It's something that we still need to profile to understand better the implications.
     4
     5I think we don't see the impact in WordPress core as there are no hooked blocks. It's the plugin's territory, so we would have to simulate that by registering a few blocks that pass `block_hooks` during the `register_block_type` call.