当前位置: X-MOL 学术arXiv.cs.SE › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
Muzeel: A Dynamic JavaScript Analyzer for Dead Code Elimination in Today's Web
arXiv - CS - Software Engineering Pub Date : 2021-06-15 , DOI: arxiv-2106.08948
Tofunmi Kupoluyi, Moumena Chaqfeh, Matteo Varvello, Waleed Hashmi, Lakshmi Subramanian, Yasir Zaki

JavaScript contributes to the increasing complexity of today's web. To support user interactivity and accelerate the development cycle, web developers heavily rely on large general-purpose third-party JavaScript libraries. This practice increases the size and the processing complexity of a web page by bringing additional functions that are not used by the page but unnecessarily downloaded and processed by the browser. In this paper, an analysis of around 40,000 web pages shows that 70% of JavaScript functions on the median page are unused, and the elimination of these functions would contribute to the reduction of the page size by 60%. Motivated by these findings, we propose Muzeel (which means eliminator in Arabic); a solution for eliminating JavaScript functions that are not used in a given web page (commonly referred to as dead code). Muzeel extracts all of the page event listeners upon page load, and emulates user interactions using a bot that triggers each of these events, in order to eliminate the dead code of functions that are not called by any of these events. Our evaluation results spanning several Android mobile phones and browsers show that Muzeel speeds up the page load by around 30% on low-end phones, and by 25% on high-end phones under 3G network. It also reduces the speed index (which is an important user experience metric) by 23% and 21% under the same network on low-end, and high-end phones, respectively. Additionally, Muzeel reduces the overall download size while maintaining the visual content and interactive functionality of the pages.

中文翻译:

Muzeel:当今网络中用于消除死代码的动态 JavaScript 分析器

JavaScript 导致当今网络日益复杂。为了支持用户交互并加快开发周期,Web 开发人员严重依赖大型通用第三方 JavaScript 库。这种做法通过带来页面不使用但浏览器不必要地下载和处理的附加功能,增加了网页的大小和处理复杂性。在本文中,对大约 40,000 个网页的分析表明,中间页面上 70% 的 JavaScript 函数没有被使用,这些函数的消除将有助于减少 60% 的页面大小。受这些发现的启发,我们提出了 Muzeel(在阿拉伯语中意为消除器);一种消除给定网页中未使用的 JavaScript 函数(通常称为死代码)的解决方案。Muzeel 在页面加载时提取所有页面事件侦听器,并使用触发每个这些事件的机器人模拟用户交互,以消除未被任何这些事件调用的函数的死代码。我们在多款Android手机和浏览器上的评测结果表明,在3G网络下,Muzeel在低端手机上的页面加载速度提高了30%左右,在高端手机上提高了25%。它还使低端和高端手机在相同网络下的速度指数(这是一个重要的用户体验指标)分别降低了 23% 和 21%。此外,Muzeel 减少了整体下载大小,同时保持页面的视觉内容和交互功能。并使用触发每个事件的机器人模拟用户交互,以消除未被任何这些事件调用的函数的死代码。我们在多款Android手机和浏览器上的评测结果表明,在3G网络下,Muzeel在低端手机上的页面加载速度提高了30%左右,在高端手机上提高了25%。它还使低端和高端手机在相同网络下的速度指数(这是一个重要的用户体验指标)分别降低了 23% 和 21%。此外,Muzeel 减少了整体下载大小,同时保持页面的视觉内容和交互功能。并使用触发每个事件的机器人模拟用户交互,以消除未被任何这些事件调用的函数的死代码。我们在多款Android手机和浏览器上的评测结果表明,在3G网络下,Muzeel在低端手机上的页面加载速度提高了30%左右,在高端手机上提高了25%。它还使低端和高端手机在相同网络下的速度指数(这是一个重要的用户体验指标)分别降低了 23% 和 21%。此外,Muzeel 减少了整体下载大小,同时保持页面的视觉内容和交互功能。我们在多款Android手机和浏览器上的评测结果表明,在3G网络下,Muzeel在低端手机上的页面加载速度提高了30%左右,在高端手机上提高了25%。它还使低端和高端手机在相同网络下的速度指数(这是一个重要的用户体验指标)分别降低了 23% 和 21%。此外,Muzeel 减少了整体下载大小,同时保持页面的视觉内容和交互功能。我们在多款Android手机和浏览器上的评测结果表明,在3G网络下,Muzeel在低端手机上的页面加载速度提高了30%左右,在高端手机上提高了25%。它还使低端和高端手机在相同网络下的速度指数(这是一个重要的用户体验指标)分别降低了 23% 和 21%。此外,Muzeel 减少了整体下载大小,同时保持页面的视觉内容和交互功能。
更新日期:2021-06-17
down
wechat
bug