...
首页> 外文期刊>ACM Transactions on Architecture and Code Optimization >Concurrent JavaScript Parsing for Faster Loading of Web Apps
【24h】

Concurrent JavaScript Parsing for Faster Loading of Web Apps

机译:并行JavaScript解析可加快Web应用程序的加载速度

获取原文
获取原文并翻译 | 示例
   

获取外文期刊封面封底 >>

       

摘要

JavaScript is a dynamic language mainly used as a client-side web script. Nowadays, web is evolving into an application platform with its web apps, and JavaScript increasingly undertakes complex computations and interactive user interfaces, requiring a high-performance JavaScript engine. There have been many optimizations for efficient JavaScript engines, but one component that has not been optimized much is JavaScript parsing. A JavaScript function needs to be parsed before being executed, and the parsing overhead takes a substantial portion of JavaScript execution time for web apps, especially during app loading. This article proposes concurrent parsing of JavaScript, which performs the parsing of JavaScript functions in advance on different threads, while the main thread is executing the parsed JavaScript functions. This can hide the parsing overhead from the main execution thread, reducing the JavaScript execution time, thus reducing the overall app loading time. More specifically, we separated JavaScript parsing and made it run on different threads without violating the execution semantics of JavaScript. We also designed an efficient multi-threaded parsing architecture, which reduces the synchronization overhead and schedules the parsing requests appropriately. Finally, we explored two methods of choosing the target functions for concurrent parsing: one based on profiled information and the other based on speculative heuristics. We performed experiments on theWebKit browser with the JSC engine for real web apps. The result shows that the proposed concurrent parsing can improve the JavaScript performance during app loading by as much as 64% and by 39.7% on average. This improves the whole app loading performance tangibly, by as much as 32.7% and by 18.2%, on average.
机译:JavaScript是一种动态语言,主要用作客户端Web脚本。如今,Web通过其Web应用程序正在演变成一个应用程序平台,而JavaScript越来越多地承担复杂的计算和交互式用户界面,这需要高性能的JavaScript引擎。对于有效的JavaScript引擎,已经进行了许多优化,但是JavaScript解析还没有进行太多优化。 JavaScript函数需要在执行之前进行解析,并且解析开销占用了Web应用的JavaScript执行时间的很大一部分,尤其是在应用加载期间。本文提出了JavaScript的并发解析,它可以在不同的线程上预先执行JavaScript函数的解析,而主线程正在执行解析后的JavaScript函数。这可以隐藏主执行线程的解析开销,从而减少JavaScript执行时间,从而减少总的应用程序加载时间。更具体地说,我们分离了JavaScript解析,并使其在不同的线程上运行,而没有违反JavaScript的执行语义。我们还设计了一种高效的多线程解析体系结构,该体系结构减少了同步开销并适当地安排了解析请求。最后,我们探索了两种选择目标函数进行并发解析的方法:一种基于概要信息,另一种基于推测启发式方法。我们在带有JSC引擎的WebKit浏览器上针对真实Web应用程序进行了实验。结果表明,提出的并发解析可以将应用程序加载期间的JavaScript性能提高多达64%,平均提高了39.7%。这样可以明显提高整个应用程序的加载性能,平均分别提高32.7%和18.2%。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号