Evaluating the Use of LLMs for Automated DOM-Level Resolution of Web Performance Issues CCS: Software and its engineering Automated analysis

Gideon Peters, SayedHassan Khatoonabadi, Emad Shihab · 2026

Read Evaluating the Use of LLMs for Automated DOM-Level Resolution of Web Performance Issues CCS: Software and its engineering Automated analysis by Gideon Peters, SayedHassan Khatoonabadi, Emad Shihab (2026) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2601-05502.txt.

Introduction

Gideon Peters and 2 co-authors evaluate, in a 2026 study, whether language models can fix web performance problems by editing a page's DOM tree. The DOM is the structured representation of a webpage that browsers render. Developers find such edits complex and slow, especially under time pressure.

The team took DOM trees from fifteen popular webpages and paired them with Lighthouse audit reports. Nine leading models each attempted repairs across seven audit categories. All models handled SEO and accessibility well, while results on load speed, interactivity, and network issues varied widely. The strongest model cut some audit problems by nearly half. Analysis showed models mostly added elements and moved positions, sometimes harming visual stability.

Catalog record

CREATORGideon Peters, SayedHassan Khatoonabadi, Emad Shihab
YEAR2026
COLLECTIONPAPERS
FORMATTXT
FILE SIZE57 KB
VERSION1.0
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2601-05502

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

Evaluating the Use of LLMs for Automated DOM-Level Resolution of Web Performance Issues CCS: Software and its engineering Automated analysis Gideon Peters, SayedHassan Khatoonabadi, Emad Shihab Abstract . Users demand fast, seamless webpage experiences, yet developers often struggle to meet these expectations within tight constraints. Performance optimization, while critical, is a time-consuming and often manual process. One of the most complex tasks in this domain is modifying the Document Object Model (DOM), which is why this study focuses on it. Recent advances in Large Language Models (LLMs) offer a promising avenue to automate this complex task, potentially transforming how developers address web performance issues. This study evaluates the effectiveness of nine state-of-the-art LLMs for automated web performance issue resolution. For this purpose, we first extracted the DOM trees of 15 popular webpages (e.g., Facebook), and then we used Lighthouse to retrieve their performance audit reports. Subsequently, we passed the extracted DOM trees and corresponding audits to each model for resolution. Our study considers 7 unique audit categories, revealing that LLMs universally excel at SEO & Accessibility issues. However, their efficacy in performance-critical DOM manipulations is mixed. While high-performing models like GPT-4.1 delivered significant reductions in areas like Initial Load , Interactivity , and Network Optimization (e.g., 46.52% to 48.68% audit incidence reductions), others, such as GPT-4o-mini, notably underperformed, consistently. A further analysis of these modifications showed a predominant additive strategy and frequent positional changes, alongside regressions particularly impacting Visual Stability . Our findings define safe areas for automation (e.g., SEO and accessibility) and reveal the limits of DOM-level resolution, underscoring the need for hybrid, validated workflows. However, it critically underscores the need for careful model selection, understanding their specific modification patterns, and robust human oversight to ensure reliable web performance improvements. 1. Introduction Web applications have become one of the primary ways users consume content on the internet ( 10 ) . Therefore, the importance of performant web applications cannot be overemphasized ( 43 ) . A webpage’s performance is a core non-functional requirement, as it impacts the overall user experience, engagement, and conversion ratios ( 57 ; 24 ) . As such, web performance engineering remains an unnegotiable component of the web development process. It requires a deep understanding of both the browser engine and application use cases ( 62 ) . Performance optimization involves various considerations including hardware (CPU and memory usage), server (API response times), and client-side factors (DOM size, image optimizations, on-demand loading, and omni-channel experience) ( 50 ; 14 ) . This study focuses on the client-side, specifically the Document Object Model (DOM), which is central to how browsers interpret, render, and interact with webpages ( 66 ; 8 ) . The DOM also significantly impacts hardware and server performance—complex DOM structures increase CPU and memory usage, slowing performance—especially on resource-limited devices. Additionally, large DOM payloads can strain server response times ( 50 ; 14 ; 29 ) . Optimizing the DOM is challenging ( 60 ) , requiring detailed analysis and targeted modifications to balance functionality and performance. Traditionally, addressing DOM inefficiencies has relied on manual interventions and automated tools with limited scope ( 40 ) . However, the growing complexity of web applications demands more sophisticated solutions ( 10 ) . Large Language Models (LLMs) present a promising approach to address these challenges. They have transformed numerous software engineering tasks by leveraging their ability to understand and generate human-like text ( 33 ; 34 ; 31 ) . Trained on massive corpora, including HTML documents from public repositories, LLMs are uniquely positioned to tackle challenges in web development ( 12 ; 20 ) . Their applications extend beyond code generation to include tasks like web security ( 61 ) , automated testing ( 45 ) , and accessibility improvements ( 39 ) . However, the effectiveness of LLMs for web performance optimization, particularly in modifying the DOM to address performance issues, has not yet been systematically explored. To fill this knowledge gap, we aim to explore the usefulness and challenges of using LLMs for automating web performance resolutions. For this purpose, we extract the DOM trees of 15 popular webpages, and we generate audit reports for these extracted DOM trees. We then assess the effectiveness of nine state-of-the-art LLMs, including GPT-4.1, Claude 3.7 Sonnet, DeepSeek R1 & V3, and GPT-4o-mini—to resolve these audits by passing the audit along with the DOM tree to the model. Finally, we generate new audit reports for the modified DOM trees and compare the incidence of the initial audits before and after modification. In summary, we aim to answer the following research questions: RQ1: How effective are LLMs in resolving web performance issues through automated DOM-level modifications? Performance optimization can be tedious, requiring web developers to run performance tests, and implement required fixes ( 32 ; 42 ) . We explore the ability of LLMs to resolve performance issues identified by Lighthouse audits across 15 webpages. Our findings indicate that LLMs achieved a 100% reduction in SEO & Accessibility issues. However, for performance-critical issues, effectiveness was mixed and highly model-dependent, with some models showing significant gains while others notably introduced regressions, particularly impacting visual stability. RQ2: What is the nature of changes made by LLMs for automated DOM-Level resolution of web performance issues? To understand how LLMs modify the DOM, we analyzed differences between the original and LLM-modified HTML pages for nine state-of-the-art models across 15 webpages. We identified modifications including element and attribute additions, removals, type changes, and positional shifts. Most LLMs used a predominantly additive strategy, with GPT-4o-mini uniquely removing more elements than it added. Frequent positional changes also occurred, typically at shallower DOM depths. Our study offers insights for web developers, LLM providers, and researchers on automating web performance remediation. We focus on DOM-level edits to compare models under identical, language-agnostic inputs and maintain reproducibility across sites. This baseline is essential since every web stack ultimately renders to the DOM ( 1 ) . However, performance regressions can also stem from the interaction of DOM, CSS, and JavaScript; thus, our findings should be applied conservatively to SPA or dynamic contexts and verified through CI/CD checks. Focusing on DOM-level changes enables direct, interpretable fixes that integrate seamlessly into existing workflows while avoiding build- or server-side confounds ( 45 ) . Our Contributions. In summary, we make the following contributions in this paper: • We conducted extensive experiments using nine LLMs on DOM trees from 15 popular webpages, providing a comprehensive evaluation of their effectiveness in automated web performance issue resolution. • We provide a token-aware chunking strategy for DOM trees based on a predefined token threshold to enable processing by LLMs for the task of web performance issue resolution. • We identified seven distinct audit categories, and provide a detailed quantitative analysis of LLM changes implemented with respect to these audits. • We synthesize actionable insights and implications for web developers, LLM providers, and the research community, guiding future development towards more robust and reliable AI-driven web performance optimization. • To promote the reproducibility of our study and facilitate future research on this topic, we publicly share our scripts and dataset online ( 7 ) . Paper Organization. The rest of the paper is organized as

Read the complete text