Synchronous Script Lazy Loading via Virtual Functions

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conventional asynchronous script lazy loading techniques lead to slow loading times and inefficient memory usage in web applications, particularly on mobile devices, due to the need for asynchronous design and complex callback functions, which complicates development and increases initial loading times.

Innovation Solution

A synchronous script lazy loading system that splits script source code into modules, loads only the required modules into memory when needed, and executes them using virtual functions, allowing for efficient loading and execution without the need for asynchronous operations or complex callback designs.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Speed

If all script modules are loaded into memory at once, then execution speed is improved, but memory usage increases and initial loading time increases

Engineering Contradiction:
Improveexecution speedVSAvoidmemory usage
Core Design Contradiction:
SpeedVSQuantity of substance

Solution Approach 1:

The patent divides the script source code into multiple separate script modules instead of loading everything at once. Each module can be independently loaded into memory only when needed, reducing initial memory usage while maintaining fast execution speed for actively used modules.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent pre-loads frequently used script modules into memory during initialization or idle periods, so that when the application runs, these modules are already available in memory for immediate execution, improving speed without requiring all modules to be loaded simultaneously.

Inventive Principle:
Principle #10Preliminary action

2Quantity of substance

If script modules are loaded asynchronously, then memory usage is reduced, but loading time increases and development complexity increases

Engineering Contradiction:
Improvememory usageVSAvoidloading time
Core Design Contradiction:
Quantity of substanceVSLoss of time

Solution Approach 1:

The patent implements a dynamic script loading mechanism that adapts to runtime conditions. Script modules are loaded synchronously when needed, but the system dynamically manages which modules remain in memory versus being reloaded, balancing memory usage and loading time based on actual usage patterns.

Inventive Principle:
Principle #15Dynamics

3Quantity of substance

If script modules are loaded asynchronously with callback functions, then memory usage is reduced, but device complexity increases

Engineering Contradiction:
Improvememory usageVSAvoiddevelopment complexity
Core Design Contradiction:
Quantity of substanceVSDevice complexity

Solution Approach 1:

The patent introduces a script manager as an intermediary component that handles the complexity of script module loading, caching, and retrieval. This manager provides a simplified interface to developers while managing the underlying synchronous loading and memory management, reducing development complexity.

Inventive Principle:
Principle #24Intermediary (Mediator)

4Device complexity

If all script files are stored in a single file, then device complexity is reduced, but loading time increases

Engineering Contradiction:
Improvefile management complexityVSAvoidloading time
Core Design Contradiction:
Device complexityVSLoss of time

Solution Approach 1:

The patent segments the monolithic script file into multiple smaller script modules organized by functionality or usage frequency. This segmentation allows the system to load only the necessary modules rather than parsing and loading an entire large file, significantly reducing loading time while maintaining manageable file organization through the script manager.

Inventive Principle:
Principle #1Segmentation

Data Source

PatentUS9292321B2System, method and computer-readable recording medium for synchronous script lazy loading
Publication Date: 2016.03.22 NAVER CORP
  • US9292321B2 patent drawing
  • US9292321B2 patent drawing
  • US9292321B2 patent drawing

AI summary

A synchronous script lazy loader generates a plurality of virtual functions. Each one of the plurality of virtual functions corresponds to one of a plurality of script modules. The plurality of script modules may be associated with a script. The synchronous script lazy loader loads each of the plurality of virtual functions into a storage space. The synchronous script lazy loader loads a desired one of the plurality of script modules into a memory from the storage space. The synchronous script lazy loader executes the desired script module from the memory when a corresponding one of the plurality of virtual functions is requested for initial execution.