Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Experiment: Run the Tag Processor on every tag on output. #5662

Draft
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

dmsnell
Copy link
Member

@dmsnell dmsnell commented Nov 12, 2023

Using this to get a baseline measurement on a kind of "worst case" scenario with the HTML Tag Processor: how much delay do we incur if we're running the processor over the final page output and processing every tag?

Why would this be useful information or a useful practice?

  • a new set of WordPress filters to adjust attribute values more robustly
  • look for security issues in URLs sent to the browser
  • look for accessibility issues
  • append extras like srcset values in one final go
  • check for duplicate id values

In this experiment every src and href attribute value is parsed.

Initial results

  • very promising: no measurable impact on the page render for twentytwentyfour's homepage
  • on my laptop it's processing at around 100 MB/s for the twentytwentyfour homepage, the speed improvement probably due to the large inline stylesheet on the page

html-all-the-things-lt120

From my estimates this should be adding around at least 1ms of page render time, but we aren't able to statistically infer that from the results. Why this is I'm not sure because I would expect a 1% change to certainly appear, but something else might be masking the impact.

@dmsnell dmsnell force-pushed the experiment/html-parse-all-the-things branch from ae3a8fc to 597bb81 Compare November 12, 2023 23:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant