Android Application Process Startup via Parallel Thread Execution

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

The existing application start method on mobile devices results in a long cold start time due to serial execution of main thread initialization and class loading, leading to inadequate user experience.

Innovation Solution

The method involves a SystemServer process sending a creation request to a daemon process to create an application process with multiple threads, where one thread initializes the main thread and another thread creates and loads class loaders in parallel, allowing the application to start more efficiently.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Loss of time

If the main thread initialization and class loading are executed in serial manner, then the system structure is simple and easy to implement, but the application start time is long

Engineering Contradiction:
Improveapplication start timeVSAvoidthread management complexity
Core Design Contradiction:
Loss of timeVSDevice complexity

Solution Approach 1:

The patent divides the application startup process into two independent segments: main thread initialization and class loading. By creating separate threads for each task, the system can execute these segments in parallel rather than sequentially, thereby reducing the total startup time while maintaining manageable complexity through clear task separation

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent transitions from a one-dimensional sequential execution model to a two-dimensional parallel execution model by introducing thread concurrency. This dimensional change allows both initialization and class loading to proceed simultaneously, effectively utilizing system resources and reducing overall execution time

Inventive Principle:
Principle #17Another dimension (Dimensionality change)

2Reliability

If a new process is created during cold start, then the application can run independently, but the start time is relatively long due to process creation overhead

Engineering Contradiction:
Improveapplication independenceVSAvoidcold start time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent performs preliminary actions within the newly created process by immediately spawning initialization and class loading threads right after process creation. This ensures that the process is fully independent and self-sufficient while minimizing the time spent on startup operations, as the critical initialization tasks begin immediately without external coordination overhead

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS11947974B2Application start method and electronic device
Publication Date: 2024.04.02 HONOR DEVICE CO LTD
  • US11947974B2 patent drawing
  • US11947974B2 patent drawing
  • US11947974B2 patent drawing

AI summary

Disclosed are an application start method and an electronic device. The method includes: obtaining, by a SystemServer process in an electronic device, a start message of a first application; sending, by the SystemServer process, a creation request for an application process to a daemon process in response to the start message, where the creation request includes application information of the first application; creating, by the daemon process, the application process for the first application in response to the creation request, where the application process includes a first thread and a second thread; executing, by the application process, the first thread and the second thread in parallel, where the first thread executes initialization of a main thread of the first application, and the second thread creates a first class loader according to the application information to load a class file of the first application.