You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit f834251
Browse filesBrowse the repository at this point in the historyBrowse files
HTML API benchmark: widen the differential test and show per-round results.
difftrace.php gains a walk that mixes modifications with bookmarks and
seeks, special-element edge cases (case, near-miss names, NUL bytes,
leading newlines, virtual closers), and an HTML Processor pass that calls
get_updated_html() and then sets an attribute while walking, so that an
update is pending when the processor parses a virtual token or an error
again. It now finds the eight inputs on which matching special elements by
raw bytes, instead of through get_tag(), changes HTML Processor output.
get_updated_html() calls are capped at 20 per input, since each one copies
the whole document.
proc_open() no longer receives STDOUT or STDERR: PHP seeks a redirected
file's shared offset to the stream's own position before handing it on,
and the outputs overwrote each other.
The report prints each round's overall change under the overall line, so
one slow round is visible instead of only widening the interval.
For the Tag Processor it loads both checkouts' `class-wp-html-tag-processor.php` into one process under renamed classes (the other HTML API files come from base), walks each input six ways (`next_token()`, `next_tag()`, `next_tag()` visiting closers, `next_tag()` with queries, with attribute, class and text modifications, and with bookmarks and seeks), applies the same action to both, and compares the return value, every public accessor and every `_doing_it_wrong()` call after every step, then the final `get_updated_html()`. For the HTML Processor it runs each checkout in its own process and compares a hash of the token stream (type, name, breadcrumbs, namespace, attributes, modifiable text, final error) per input, and shows the first differing token for up to five inputs.
156
+
For the Tag Processor it loads both checkouts' `class-wp-html-tag-processor.php` into one process under renamed classes (the other HTML API files come from base), walks each input seven ways (`next_token()`, `next_tag()`, `next_tag()` visiting closers, `next_tag()` with queries, with attribute, class and text modifications, with bookmarks and seeks, and with both mixed), applies the same action to both, and compares the return value, every public accessor and every `_doing_it_wrong()` call after every step, then the final `get_updated_html()`. For the HTML Processor it runs each checkout in its own process and compares a hash of the token stream (type, name, breadcrumbs, namespace, attributes, modifiable text, final error) per input, walked once plain and once setting attributes and calling `get_updated_html()` along the way, and shows the first differing token for up to five inputs.
157
157
158
-
The inputs are the real corpus, the synthetic shapes at 5 KB and 100 KB, about 250 hand-written edge cases with every prefix of each (which exercises incomplete input), and 20,000 mutated slices of the corpus (`--mutations`). A run takes about a minute and a half and exits 1 when anything differs. Removing `\r` from the whitespace skipped around `=`, or the `XMP` case from the special-element switch, each produce hundreds of differing inputs.
158
+
The inputs are the real corpus, the synthetic shapes at 5 KB and 100 KB, about 270 hand-written edge cases with every prefix of each (which exercises incomplete input), and 20,000 mutated slices of the corpus (`--mutations`). A run takes about a minute and a half and exits 1 when anything differs. Removing `\r` from the whitespace skipped around `=`, or the `XMP` case from the special-element switch, each produce hundreds of differing inputs.
0 commit comments