IP Library Granted Patent US 12705070
Granted Patent B2
US 12705070 · App. 18/718,946 · Granted Aug 11, 2026

Method, apparatus, computer device, and storage medium for optimizing startup of application

Inventor: Shuangqing Xu (Beijing, CN)
Assignee: Beijing Bytedance Network Technology Co., Ltd.
G06F9/44578G06F9/5038
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12705070
App. No.
18/718,946
Granted
Aug 11, 2026
Kind
B2
Abstract

The embodiments of the present disclosure provide a method, an apparatus, a computer device and a storage medium for optimizing startup of an application. The method comprises obtaining initial codes of an application to be optimized for being deployed in a target operating system, wherein the initial codes include a first priority parameter corresponding to at least one asynchronous thread task, the asynchronous thread task is other thread task executed upon startup of the application to be optimized other than a main thread task, and the first priority parameter characterizes a priority order for allocating computing resources; determining, in the at least one asynchronous thread task, a target thread task irrelevant to display of a startup page of the application to be optimized; and adjusting the first priority parameter corresponding to the target thread task to obtain target codes of an optimized target application.

Claims (41)

1 . A method for optimizing startup of an application, comprising:

obtaining, by a computer device, initial codes of an application to be optimized for being deployed in a target operating system of the computer device, wherein the initial codes include a first priority parameter corresponding to at least one asynchronous thread task, the at least one asynchronous thread task is other thread task executed upon startup of the application to be optimized other than a main thread task, and the first priority parameter characterizes a priority order for allocating computing resources;

determining, by the computer device based on startup results of the application to be optimized corresponding to the at least one asynchronous thread task, a target thread task irrelevant to display of a startup page of the application to be optimized in the at least one asynchronous thread task, comprising:

for an asynchronous thread task of the at least one asynchronous thread task, starting, by the computer device, the application to be optimized to determine a first startup result in a case of the asynchronous thread task being executed; and starting, by the computer device, the application to be optimized to determine a second startup result in a case of the asynchronous thread task being not executed, wherein the first startup result and the second startup result characterize a speed for displaying the startup page;

determining, by the computer device based on the first startup result and the second startup result corresponding to the asynchronous thread task, the target thread task in the at least one asynchronous thread task; and

adjusting, by the computer device, the first priority parameter corresponding to the target thread task to obtain target codes of an optimized target application.

2 . The method of claim 1 , wherein the initial codes also include a second priority parameter corresponding to the main thread task, and wherein a priority order corresponding to a parameter value of the second priority parameter is higher than a priority order corresponding to a parameter value of the first priority parameter.

3 . The method of claim 1 , wherein adjusting the first priority parameter corresponding to the target thread task comprises:

adjusting a parameter value of the first priority parameter corresponding to the target thread task from a first target parameter value to a second target parameter value, wherein a priority order corresponding to the second target parameter value is lower than that of the first target parameter value.

4 . The method of claim 1 , wherein determining, by the computer device based on the first startup result and the second startup result corresponding to the at least one asynchronous thread task, the target thread task in the at least one asynchronous thread task comprises:

determining, based on the first startup result and the second startup result corresponding to each of the at least one asynchronous thread task, the target thread task in the at least one asynchronous thread task and target impact information corresponding to the target thread task, wherein the target impact information characterizes a degree of impact of the target thread task on the application to be optimized; and

wherein adjusting, by the computer device, the first priority parameter corresponding to the target thread task to obtain the target codes of the optimized target application comprises:

adjusting, based on the target impact information corresponding to each target thread task, the first priority parameter corresponding to each target thread task to obtain the target codes of the optimized target application.

5 . The method of claim 1 , wherein the target operating system is an iOS operating system, the computing resource is a time slice, and the first priority parameter is a Quality of Service parameter.

6 . A computer device, comprising: a processor, and a memory, wherein the memory stores machine-readable instructions which, when executed by the processor, cause the computer device to perform a method comprising:

obtaining initial codes of an application to be optimized for being deployed in a target operating system, wherein the initial codes include a first priority parameter corresponding to at least one asynchronous thread task, the at least one asynchronous thread task is other thread task executed upon startup of the application to be optimized other than a main thread task, and the first priority parameter characterizes a priority order for allocating computing resources;

determining, based on startup results of the application to be optimized corresponding to the at least one asynchronous thread task, a target thread task irrelevant to display of a startup page of the application to be optimized in the at least one asynchronous thread task, comprising:

for an asynchronous thread task of the at least one asynchronous thread task, starting the application to be optimized to determine a first startup result in a case of the asynchronous thread task being executed; and starting the application to be optimized to determine a second startup result in a case of the asynchronous thread task being not executed, wherein the first startup result and the second startup result characterize a speed for displaying the startup page;

determining, based on the first startup result and the second startup result corresponding to the asynchronous thread task, the target thread task in the at least one asynchronous thread task; and

adjusting the first priority parameter corresponding to the target thread task to obtain target codes of an optimized target application.

7 . The computer device of claim 6 , wherein the initial codes also include a second priority parameter corresponding to the main thread task, and wherein a priority order corresponding to a parameter value of the second priority parameter is higher than a priority order corresponding to a parameter value of the first priority parameter.

8 . The computer device of claim 6 , wherein adjusting the first priority parameter corresponding to the target thread task comprises:

adjusting a parameter value of the first priority parameter corresponding to the target thread task from a first target parameter value to a second target parameter value, wherein a priority order corresponding to the second target parameter value is lower than that of the first target parameter value.

9 . The computer device of claim 6 , wherein determining, based on the first startup result and the second startup result corresponding to the asynchronous thread task, the target thread task in the at least one asynchronous thread task comprises:

determining, based on the first startup result and the second startup result corresponding to each of the at least one asynchronous thread task, the target thread task in the at least one asynchronous thread task and target impact information corresponding to the target thread task, wherein the target impact information characterizes a degree of impact of the target thread task on the application to be optimized; and

wherein adjusting the first priority parameter corresponding to the target thread task to obtain the target codes of the optimized target application comprises:

adjusting, based on the target impact information corresponding to each target thread task, the first priority parameter corresponding to each target thread task to obtain the target codes of the optimized target application.

10 . The computer device of claim 6 , wherein the target operating system is an iOS operating system, the computing resource is a time slice, and the first priority parameter is a Quality of Service parameter.

11 . A non-transitory computer-readable storage medium stored thereon with computer programs which, when executed by a processor of a device, cause the device to perform a method comprising:

obtaining, by the device, initial codes of an application to be optimized for being deployed in a target operating system of the device, wherein the initial codes include a first priority parameter corresponding to at least one asynchronous thread task, the at least one asynchronous thread task is other thread task executed upon startup of the application to be optimized other than a main thread task, and the first priority parameter characterizes a priority order for allocating computing resources;

determining, by the device based on startup results of the application to be optimized corresponding to the at least one asynchronous thread task, a target thread task irrelevant to display of a startup page of the application to be optimized in the at least one asynchronous thread task, comprising:

for an asynchronous thread task of the at least one asynchronous thread task, starting, by the device, the application to be optimized to determine a first startup result in a case of the asynchronous thread task being executed; and starting, by the device, the application to be optimized to determine a second startup result in a case of the asynchronous thread task being not executed, wherein the first startup result and the second startup result characterize a speed for displaying the startup page;

determining, by the device based on the first startup result and the second startup result corresponding to the asynchronous thread task, the target thread task in the at least one asynchronous thread task; and

adjusting, by the device, the first priority parameter corresponding to the target thread task to obtain target codes of an optimized target application.

12 . The non-transitory computer-readable storage medium of claim 11 , wherein the initial codes also include a second priority parameter corresponding to the main thread task, and wherein a priority order corresponding to a parameter value of the second priority parameter is higher than a priority order corresponding to a parameter value of the first priority parameter.

13 . The non-transitory computer-readable storage medium of claim 11 , wherein adjusting, by the device, the first priority parameter corresponding to the target thread task comprises:

adjusting a parameter value of the first priority parameter corresponding to the target thread task from a first target parameter value to a second target parameter value, wherein a priority order corresponding to the second target parameter value is lower than that of the first target parameter value.

14 . The non-transitory computer-readable storage medium of claim 11 , wherein determining, by the device based on the first startup result and the second startup result corresponding to the asynchronous thread task, the target thread task in the at least one asynchronous thread task comprises:

determining, based on the first startup result and the second startup result corresponding to each of the at least one asynchronous thread task, the target thread task in the at least one asynchronous thread task and target impact information corresponding to the target thread task, wherein the target impact information characterizes a degree of impact of the target thread task on the application to be optimized; and

wherein adjusting, by the device, the first priority parameter corresponding to the target thread task to obtain the target codes of the optimized target application comprises:

adjusting, based on the target impact information corresponding to each target thread task, the first priority parameter corresponding to each target thread task to obtain the target codes of the optimized target application.