Parallel Application Component Loading to Reduce UI Thread Blocking
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional methods for loading application components in electronic devices result in slow response and low efficiency due to serial loading, which prolongs the duration of component loading and affects user interface switching efficiency.
Innovation Solution
Implementing a parallel loading method where a secondary thread loads application components concurrently with the UI thread, particularly for components with long loading durations, to reduce the impact of loading time on user interface switching and improve overall response speed and efficiency.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Speed
If components are loaded in serial with the UI thread, then loading order is simple to control, but loading duration is prolonged and response speed is reduced
Solution Approach 1:
The loading process is segmented into two independent threads: the UI thread handles user interface operations while the second thread handles component loading. This segmentation allows simultaneous execution of UI operations and component loading, reducing the overall time required and improving response speed without complicating the loading order through explicit thread management.
Solution Approach 2:
The second thread performs component loading in advance during the main process starting phase, before the UI thread needs to access these components. By preparing components beforehand in parallel with UI initialization, the system reduces waiting time and improves response speed when users interact with the application.
2Productivity
If components are loaded in parallel with the UI thread, then loading efficiency is improved, but thread management complexity increases
Solution Approach 1:
The system is divided into two functional segments: the UI thread responsible for interface operations and the second thread responsible for component loading. This clear segmentation improves loading efficiency by enabling parallel execution while keeping thread management complexity manageable through well-defined role separation.
Solution Approach 2:
The patent introduces a coordination mechanism that acts as an intermediary between the UI thread and the second thread. This mediator manages the interaction and data exchange between threads, improving loading efficiency while abstracting away the complexity of direct thread management from the business logic.
3Speed
If all components are loaded in parallel, then loading speed is improved, but waiting time for Activity component increases due to excessive quantity of components
Solution Approach 1:
The second thread loads only the necessary components in parallel during the main process starting phase, rather than loading all components simultaneously. This partial action approach improves loading speed for critical components while avoiding the excessive waiting time that would result from loading an excessive quantity of components in parallel.
Solution Approach 2:
Different loading strategies are applied to different components based on their characteristics. Critical components with long loading durations are loaded in parallel by the second thread, while other components are handled appropriately. This localized optimization improves overall loading speed without causing excessive waiting times for Activity components.
Data Source
AI summary
The present disclosure relates to methods for loading a component of an application and apparatuses. In one example method, a user interface (UI) thread of an application is running, and all or some components of the application are loaded based on a thread running in parallel with the UI thread.


