Virtual Machine Wrapper for Code Execution Efficiency
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing rendering engine compilation processes are slow due to high computational requirements, leading to inefficient rendering speeds.
Innovation Solution
A code execution method that utilizes a virtual machine to create a wrapper object and separate code compilation and execution, allowing the execution engine to control the code execution process, thereby improving efficiency by compiling and executing codes through a mapping relationship between wrapper objects and native operating system codes.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If the rendering engine compiles resource files directly in the device end, then the rendering can be achieved, but the compilation process requires large amount of calculations and results in slow rendering speed
Solution Approach 1:
The patent introduces a virtual machine as an intermediary component between the execution engine and the registration component. The virtual machine receives initialization instructions from the execution engine, creates wrapper objects through the registration component, compiles target codes to generate execution codes, and sends them back to the execution engine. This intermediary architecture distributes the computational workload and optimizes the rendering pipeline, resolving the contradiction between rendering speed and computational requirements.
2Productivity
If code compilation and execution are integrated in the same system, then the process is simplified, but the code execution efficiency is reduced due to the heavy computational burden of compilation
Solution Approach 1:
The patent segments the code execution system into distinct functional components: the execution engine that sends initialization instructions, the virtual machine that coordinates compilation and execution, the registration component that creates wrapper objects, and the execution engine that runs the compiled codes. This segmentation separates compilation and execution processes into different modules, allowing each component to specialize in its function and operate more efficiently, thereby improving code execution efficiency while managing system complexity through modular design.
Data Source
AI summary
A code execution method and device, as well as a rendering apparatus are provided. A specific solution includes: receiving an initialization instruction from an execution engine, the initialization instruction being acquired by loading target codes through the execution engine; sending a registration instruction to a registration component according to the initialization instruction, to create a wrapper object required for executing the target codes; compiling the target codes to acquire an execution codes corresponding to the target codes, according to a mapping relationship between the wrapper object and native codes of an operating system; and sending the execution codes to the execution engine to execute the execution codes. The execution engine can mainly control the code execution process, thereby improving a code execution efficiency.


