Performance work is slow, manual, and lives in the DOM.
Users expect pages to be fast, but fixing performance is time-consuming, and changing the Document Object Model is among the hardest parts of the job. LLMs are increasingly pitched as the tool for this kind of change.
So we asked a concrete question: given a real page's DOM and its Lighthouse audit, can an LLM actually make the issues go away, and what does it break along the way?
Capture each page's full DOM and run a baseline Lighthouse audit.
Split large DOMs into token-aware chunks that fit each model's context.
Give every model the chunk and its audits, and ask it to resolve the issues.
Stitch the modified chunks back into a working page.
Re-run Lighthouse, measure the change in audit incidence, and diff the DOM.
Excellent at the easy fixes, mixed where performance really lives.
Every model cleared all SEO and accessibility issues. On the categories that matter most for speed (initial load, interactivity and network), results varied widely. The strongest model, GPT-4.1, cut audit incidence by roughly 47–49%, while others, such as GPT-4o-mini, consistently fell short.
SEO and accessibility: every model. Performance categories: the strongest model (GPT-4.1), with reductions between 46.52% and 48.68%. See the paper for the per-category, per-model breakdown.
LLMs mostly add things and move things around, and sometimes the page gets less stable.
- Additive by default. Diffing the DOMs showed models mostly add elements and attributes and often reposition nodes, rather than simplifying the page.
- Regressions are real. Some fixes made visual stability worse: the page passed one audit and failed another.
- There's a safe zone. SEO and accessibility fixes are good candidates for automation today.
- Everything else needs a check. For performance-critical changes, the answer is hybrid workflows where every LLM edit is re-measured before it ships.