WordPress/wp-includes/html-api
dmsnell 6961426665 HTML API: Defer applying attribute updates until necessary.
When making repeated updates to a document, the Tag Processor will end
up copying the entire document once for every update. This can lead to
catastrophic behavior in the worse case.

However, when batch-applying updates it's able to copy chunks of the
document in one thread and only end up copying the entire document once
for the entire batch.

Previously the Tag Processor has been eagerly applying udpates, but in
this patch it defers applying those updates as long as is possible.

Developed in https://github.com/WordPress/wordpress-develop/pull/6120
Discussed in https://core.trac.wordpress.org/ticket/60697

Props: dmsnell, bernhard-reiter, jonsurrell, westonruter.
Fixes #60697.
Follow-up to [55706], [56941], [57348].


Built from https://develop.svn.wordpress.org/trunk@57805


git-svn-id: http://core.svn.wordpress.org/trunk@57306 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-03-11 23:55:09 +00:00
..
class-wp-html-active-formatting-elements.php HTML API: Apply linting changes to @TODO comments. 2023-12-20 12:36:31 +00:00
class-wp-html-attribute-token.php HTML API: Track spans of text with (offset, length) instead of (start, end). 2023-12-10 13:19:28 +00:00
class-wp-html-open-elements.php HTML API: Add support for list elements. 2024-01-10 14:05:17 +00:00
class-wp-html-processor-state.php HTML API: Store current token reference in HTML Processor state. 2023-09-12 15:12:17 +00:00
class-wp-html-processor.php HTML API: Ensure that breadcrumbs are properly retained after seeking. 2024-03-05 05:34:11 +00:00
class-wp-html-span.php HTML API: Track spans of text with (offset, length) instead of (start, end). 2023-12-10 13:19:28 +00:00
class-wp-html-tag-processor.php HTML API: Defer applying attribute updates until necessary. 2024-03-11 23:55:09 +00:00
class-wp-html-text-replacement.php HTML API: Track spans of text with (offset, length) instead of (start, end). 2023-12-10 13:19:28 +00:00
class-wp-html-token.php HTML-API: Prevent unintended behavior when WP_HTML_Token is unserialized. 2023-12-06 16:05:19 +00:00
class-wp-html-unsupported-exception.php HTML-API: Introduce minimal HTML Processor. 2023-07-20 13:43:25 +00:00