Mini Program Page Rendering via Client-Side Function Offloading
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
The use of a browser process to render mini program page frames leads to high memory occupation and a risk of force closure, especially as the duration of use increases, affecting the stability and normal operation of mini programs.
Innovation Solution
A method where the browser process transfers the rendering function call to the client process, using a second rendering function with equivalent graphics rendering capability, thereby reducing memory consumption and minimizing the risk of browser process closure.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Ease of operation
If the browser process is used to render the mini program page frame, then the service logic code can be executed through the browser process, but the memory occupation increases and the risk of force close occurs
Solution Approach 1:
The patent segments the rendering process into two parts: the browser process executes service logic code and generates rendering commands, while the client process executes the actual rendering function. This segmentation separates the logical execution environment from the graphics rendering workload, reducing memory occupation in the browser process and eliminating the force close risk while maintaining code execution capability.
2Productivity
If the browser process calls the first rendering function directly, then the rendering can be performed, but the memory occupation increases leading to force close
Solution Approach 1:
The patent extracts the rendering function execution from the browser process and transfers it to the client process. The browser process writes rendering function calling information to a command buffer and transmits a calling processing request, while the client process determines and executes the corresponding rendering function. This extraction removes the heavy graphics rendering workload from the browser process, significantly reducing its memory occupation and preventing force close.
3Quantity of substance
If the rendering function call is transferred to the client process, then the memory consumption is reduced, but the process complexity increases
Solution Approach 1:
The patent introduces a command buffer as an intermediary mechanism between the browser process and client process. The browser process writes rendering function calling information to the command buffer, which serves as a standardized interface for transmitting rendering requests. The client process reads from this buffer and executes the corresponding rendering functions. This intermediary approach standardizes the interaction protocol, making the process complexity manageable through well-defined communication interfaces rather than direct complex process coordination.
Data Source
AI summary
In a method, based on a start operation for a mini program of an application, a browser process of a browser is started through a client process of the application. Service logic code of the mini program is executed in the browser process. Based on execution of a calling code in the service logic code that invokes a first rendering function, calling information of the first rendering function is written into a command buffer through the browser process, a calling processing request for the calling information is generated, and the calling processing request is transmitted to the client process through the browser process. A second rendering function having a same graphics rendering functionality is determined as the first rendering function, and the second rendering function is called based on the calling information. Graphics rendering of the page frame of the mini program is performed through the second rendering function.


