NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Accelerating web application loading with snapshot of event and DOM handling

Ji Hwan Yeo, JinSeok Oh, Soo-Mook MoonCC 2019

Abstract

Reducing the loading time of a web app is important for a better user experience. The loading time includes a large amount of JavaScript execution, often composed of the execution of the global code in the script tags followed by the execution of event handlers. One approach to accelerate the app loading is saving the already-loaded execution state of JavaScript objects in a file called the snapshot in advance. Then, we start an app by copying the objects in the snapshot to the JavaScript heap directly, instead of executing JavaScript code to create them. Unfortunately, existing works save only the execution state of the global code in the snapshot, not that of the event handlers. Also, JavaScript code whose execution may change the DOM (Document Object Model) tree is not saved in the snapshot, limiting the coverage of the snapshot. In this paper, we introduce snapshot+, an extended version of the snapshot where we save the execution state of the event handlers as well as that of the global code. Unlike the global code whose execution order is statically determined, the event handlers have a more dynamic execution order, depending on the triggering order of the events and the registration order of the event handlers. This makes it somewhat complicated to decide when to create and restore the snapshot. Snapshot+ provides a new API for the app developer to specify and register the event handlers eligible for snapshot, so the browser can create and restore the snapshot at the right place automatically. Also, snapshot+ can save a changed DOM tree in a serialized HTML string and restore it during app loading, allowing the DOM-changing JavaScript executions to be saved in the snapshot. Our experimental results show that snapshot+ can improve the app loading time by 52% (AngularJS apps), 42% (Ext JS apps), 48% (jQuery apps), and 18% (MooTools apps), compared to the original snapshot.
BibTeX
@inproceedings{yeo2019accelerating,
  author = {Ji Hwan Yeo and JinSeok Oh and Soo-Mook Moon},
  title = {{Accelerating web application loading with snapshot of event and DOM handling}},
  booktitle = {CC},
  year = {2019},
  url = {https://openreview.net/forum?id=PMHXleZbIU},
}

Loading related content...

Figure