Precompiled JavaScript Storage for Browser Page Load Optimization

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current JavaScript engines in browsers spend a significant portion of page load time compiling and executing JavaScript code, which slows down the loading of webpages, with 30% of page load time attributed to JavaScript evaluation.

Innovation Solution

Implementing a preemptive compilation method where scripting-language code, such as JavaScript, is precompiled and stored on a communication device before it is requested, allowing for immediate execution when the webpage is accessed, thereby avoiding the need for recompilation and reducing page load times.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If JavaScript code is compiled at runtime during page loading, then the browser can execute the code immediately, but the page load time increases significantly due to compilation overhead

Engineering Contradiction:
Improvecode execution readinessVSAvoidpage load time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent applies preliminary action by precompiling JavaScript code before the page is actually loaded. The system identifies JavaScript files that need to be compiled, performs the compilation in advance during a separate compilation phase, and stores the compiled code so it can be executed immediately when the page loads, thereby eliminating the compilation delay during page load time

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent segments the JavaScript compilation process into a separate precompilation phase and an execution phase. Instead of compiling code inline during page loading, the system separates these operations: first identifying and precompiling the JavaScript code, then executing it when needed. This segmentation allows the compilation overhead to be performed independently of the page load time

Inventive Principle:
Principle #1Segmentation

2Quantity of substance

If compiled code is removed from memory to free space, then memory efficiency improves, but the precompiled code becomes unavailable for immediate execution

Engineering Contradiction:
Improvememory availabilityVSAvoidcode availability time
Core Design Contradiction:
Quantity of substanceVSLoss of time

Solution Approach 1:

The patent applies local quality by creating a special protected storage region for precompiled JavaScript code within the memory system. This protected area distinguishes precompiled code from other temporary code, ensuring that precompiled code is retained in memory even when other code is cleaned up or when memory pressure exists. The protected storage location ensures immediate code availability without interfering with general memory management

Inventive Principle:
Principle #3Local quality

Data Source

PatentUS8880991B2Methods and apparatus for improved browsing performance by precompilation of high-priority JavaScripts in a webpage and delaying the removal of corresponding compiled code
Publication Date: 2014.11.04 QUALCOMM INNOVATION CENTER INC
  • US8880991B2 patent drawing
  • US8880991B2 patent drawing
  • US8880991B2 patent drawing

AI summary

Methods and apparatus for processing scripting-language code in webpages are disclosed. The method includes obtaining scripting-language code that is utilized by a higher-priority webpage, compiling the scripting-language code to generate higher-priority compiled code objects, storing the higher-priority compiled code objects on a communication device, distinguishing the higher-priority compiled code objects from other compiled code objects that are stored on the communication device to delay the higher-priority compiled code objects from being removed from the communication device, and executing the higher-priority compiled code objects when the webpage is requested by the user. In many variations, this approach is not applied to all webpages visited, but only on certain webpages and scripts that are considered high priority, either implicitly or explicitly, based on a priority function that computes a multi-level priority from the history and past browser activity.