Script Bundler Deterministic Chunk Identifiers
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current script bundling mechanisms fail to efficiently manage dependencies in large-scale web applications, leading to redundant copies of common modules being downloaded multiple times, which increases memory usage, network capacity, and slows down web application loading and rendering.
Innovation Solution
A bundler application assigns unique and deterministic identifiers to script code modules and chunks, ensuring that only one copy of each common module is transmitted to the web client by identifying cross-dependencies across multiple bundles and using these identifiers to resolve dependencies efficiently.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If scripts are bundled with their dependencies in a distributed fashion to allow independent development, then developer productivity is improved, but redundant copies of common modules are downloaded multiple times increasing memory usage and network capacity
Solution Approach 1:
The patent merges multiple bundles that contain common modules into a single shared bundle. The bundler application identifies common modules across bundles and consolidates them, so that instead of each bundle having its own copy of common modules like jQuery or lodash, there is one master copy that can be shared across multiple bundles through reference links.
Solution Approach 2:
The patent creates a universal common module bundle that serves multiple web applications and multiple specific bundles simultaneously. This universal bundle contains modules that are referenced by various application-specific bundles, allowing the same module copy to fulfill multiple functions and serve different bundles without duplication.
2Adaptability or versatility
If multiple copies of common modules are transmitted to the web client, then each bundle can be independently deployed, but loading and rendering speed deteriorates
Solution Approach 1:
The patent combines multiple copies of common modules into a single shared bundle that is transmitted to the web client. Instead of sending separate copies with each bundle, the system sends one consolidated common module bundle that all application-specific bundles can reference, thereby reducing total transmission time and improving loading speed while maintaining independent deployability.
3Adaptability or versatility
If large common modules are bundled with each web component, then web components can be individually deployed, but memory usage at web server and web client increases
Solution Approach 1:
The patent merges all common modules from various bundles into a single shared bundle, eliminating redundant storage across multiple bundles. The web server stores one copy instead of multiple copies, reducing server memory usage. The web client also downloads and stores only one copy of common modules that can be shared across all bundles, reducing client memory usage while preserving individual deployment capability.
Data Source
Figure 1
Figure 2
Figure 3
AI summary
A computing system may include a computing device configured to build modules of script code into bundles, and a bundler application executable to perform operations comprising: obtaining one or more of the modules of script code that are designated for bundling with one another; organizing the modules of script code into one or more chunks; for each respective chunk of the one or more chunks: (i) determining whether the respective chunk is to be assigned a deterministic chunk identifier or a non-deterministic chunk identifier, and (ii) assigning the respective chunk a chunk identifier as determined, where deterministic chunk identifiers are usable for referencing by additional modules of script code both within and not within in the respective chunk, and where the deterministic chunk identifiers are independent of characteristics of the computing device; and writing the one or more chunks to a bundle.