Predictive Pre-decoding for Smooth Media Scrolling
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Mobile devices face performance issues when displaying large numbers of images due to limited memory, leading to processing delays and a jittery display experience as older image bitmaps are evicted from memory, requiring reprocessing and reloading.
Innovation Solution
Implementing a predictive pre-decoding technique where the next encoded media item is predicted based on user scrolling behavior and pre-decoded from a slower memory storage to a faster RAM, ensuring smooth display by having the pre-decoded item ready before it's needed.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Speed
If images are stored in memory for quick display, then display speed is improved, but memory usage increases and older images are evicted
Solution Approach 1:
The system pre-decodes images from encoded format to bitmap format before they are actually needed for display. When scrolling stops, the system determines the next image position and pre-decodes that image, so it is ready in memory when the user continues scrolling, eliminating display delays without requiring all images to be simultaneously loaded.
Solution Approach 2:
The image display system divides images into different storage and processing stages: encoded images stored in persistent storage, pre-decoded bitmaps in memory cache, and currently displayed images on screen. This segmentation allows the system to manage limited memory resources efficiently by only keeping decoded bitmaps for images that are likely to be displayed soon.
2Quantity of substance
If older image bitmaps are evicted from memory to free space, then memory management is improved, but processing time increases due to reprocessing
Solution Approach 1:
The system performs preliminary decoding of images that are predicted to be needed next, converting them from encoded format to bitmap format in advance. This pre-processing eliminates the need for time-consuming reprocessing when images are evicted and need to be displayed again, as the decoded bitmaps are already available in memory.
Solution Approach 2:
The system changes the state of images from encoded format to decoded bitmap format selectively based on predicted usage. By changing the parameter of image format for specific images that are likely to be displayed soon, the system optimizes the balance between memory usage and display performance.
3Stability of the object's composition
If all images are kept in memory, then display smoothness is improved, but memory consumption exceeds available capacity
Solution Approach 1:
Instead of loading all images into memory, the system performs preliminary decoding only for images that are predicted to be displayed next based on scrolling behavior analysis. This selective pre-decoding maintains display smoothness by ensuring likely-needed images are ready, while consuming only the necessary amount of memory.
Solution Approach 2:
The system dynamically adjusts which images are pre-decoded and kept in memory based on real-time scrolling behavior. When the user scrolls in a particular direction and stops, the system determines the next likely image position and dynamically pre-decodes that image, adapting memory usage to actual user needs rather than using a fixed strategy.
4Quantity of substance
If images are decoded on-demand, then memory usage is reduced, but display latency increases causing jittery scrolling
Solution Approach 1:
The system combines on-demand decoding with preliminary action by detecting when scrolling stops and immediately pre-decoding the next likely image. This hybrid approach reduces display latency for predicted images while maintaining memory efficiency by not pre-decoding all images, thus resolving the contradiction between memory usage and display latency.
Data Source
AI summary
Displaying a plurality of encoded media items on a device includes: detecting that a first scrolling action has been completed; determining a predicted next encoded media item to be displayed; obtaining the predicted next encoded media item from a first memory; pre-decoding the predicted next encoded media item to generate a pre-decoded media item; storing the pre-decoded media item in a second memory, the second memory having lower latency than the first memory; receiving an indication that a second scrolling action has begun; and in response to the second scrolling action, displaying the pre-decoded media item via a display interface.


