[wp-trac] [WordPress Trac] #61401: Blocks: Efficiently find and traverse blocks in a document.
WordPress Trac
noreply at wordpress.org
Sat Jun 8 15:58:48 UTC 2024
#61401: Blocks: Efficiently find and traverse blocks in a document.
-----------------------------+-----------------------------
Reporter: dmsnell | Owner: (none)
Type: feature request | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Editor | Version:
Severity: normal | Keywords:
Focuses: |
-----------------------------+-----------------------------
The existing block parser reliably parses blocks, but it's also a heavy
operation, involving a full parse of the entire document, the construction
of a full block tree which includes multiple copies of different spans of
the source content, and the JSON-parsing of every span of block
attributes.
In many situations it's only necessary to find specific blocks within a
document, or find where they start or end, or build a map of document
structure without needing the full parse.
WordPress should provide a reliable and efficient way to traverse the
Blocks in an HTML document in a streaming manner.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/61401>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list