Decoding Task Queue Scheduling for Smooth Page Rendering
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing page rendering technologies face challenges in maintaining a consistent frame rate of 60 frames per second due to variable decoding durations, leading to poor user experience and frame freezing issues.
Innovation Solution
A method to determine a target decoding task queue by calculating the decoding duration of to-be-loaded content, ensuring the sum of decoding durations is within a threshold, thereby controlling the entire rendering process within 16 ms, using techniques such as table lookup or mathematical interpolation, and prioritizing remaining decoding tasks for efficient execution.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If the decoding task queue includes all decoding requirements of the to-be-loaded content, then the completeness of content rendering is improved, but the decoding duration exceeds the threshold causing frame rate to drop below 60 frames/second
Solution Approach 1:
The decoding task queue is segmented into a target decoding task queue (for current frame) and a remaining decoding task queue (for subsequent frames). This segmentation allows the system to prioritize decoding tasks that fit within the 16ms threshold while preserving other tasks for future rendering cycles, thus maintaining both frame rate and content completeness.
Solution Approach 2:
The system dynamically adjusts the composition of the decoding task queue based on the calculated decoding duration. By evaluating the total decoding duration against the threshold and selectively including or excluding tasks, the system adaptively optimizes the balance between rendering speed and content completeness for each frame.
2Productivity
If the decoding duration is reduced to meet the 16 ms threshold, then the frame rate is improved to 60 frames/second, but the completeness of decoded content may be compromised
Solution Approach 1:
The system performs preliminary calculation of decoding duration for the to-be-loaded content before constructing the target decoding task queue. This advance calculation enables the system to pre-determine which decoding tasks can be completed within the threshold, ensuring frame rate requirements are met while maintaining content completeness through prior planning.
Solution Approach 2:
Decoding tasks that cannot be completed within the current frame's time threshold are temporarily discarded from the target queue and recovered in subsequent rendering cycles. This allows the system to meet strict timing requirements for the current frame while ensuring that all content will eventually be decoded and rendered.
3Ease of operation
If the decoding task queue is optimized to meet timing constraints, then the rendering smoothness is improved, but the complexity of task management increases
Solution Approach 1:
The system implements a feedback mechanism where the calculated decoding duration is continuously compared against the threshold, and the target decoding task queue is adjusted accordingly. This closed-loop control automates the optimization process, improving rendering smoothness through systematic task selection while reducing the need for complex manual task management.
Data Source
Figure 1
Figure 2
Figure 3
AI summary
A method for determining a decoding task and an apparatus are disclosed. The method includes: obtaining to-be-loaded content of a to-be-rendered page (S110); obtaining a decoding duration of the to-be-loaded content (S120); determining a target decoding task queue based on the decoding duration of the to-be-loaded content, where a sum of decoding durations of decoding tasks included in the target decoding task queue is less than a threshold (S130); and executing the decoding tasks included in the target decoding task queue (S140). According to the method, a consumed time of an entire rendering process can be made to be within an expected range, for example, within 16 ms, thereby effectively improving page rendering smoothness and improving user experience.