Boot acceleration method, device, electronic device and storage medium
By classifying and determining the optimal compilation method on Android electronic devices, the problem of slow startup speed is solved, and the application loading and compilation speed and user experience is significantly improved.
Patent Information
- Application Number
- CN202210102437.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-27
- Publication Date
- 2025-03-21
- Estimated Expiration
- 2042-01-27
AI Technical Summary
After the first boot or system upgrade, the dex files of all APPs need to be compiled, resulting in slow booting speed and affecting the user experience.
When a startup command is detected, scan all applications of the electronic device, classify each application according to preset classification rules, determine the corresponding compilation method, and execute each application according to the compilation method.
By optimizing the compilation method of the application, it becomes the optimal compilation method, speed up the compilation speed, greatly improve the loading and compilation speed of the application, realize the startup of electronic devices, and improve the user experience.
Smart Images

Figure CN114489672B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a boot acceleration method, device, electronic device and storage medium. Background Art
[0002] At present, electronic devices such as mobile phones and tablets usually have a large number of APPs (Applications) installed. For electronic devices with Android systems, when the electronic device is turned on for the first time or after the system is upgraded, the Android system compiles the dex files (executable files of the Android system) of all APPs, that is, a dex2oat compilation is performed for each APP. This compilation process is very time-consuming. The more APPs there are, the longer the time, which makes the boot speed slow and affects the user experience. Especially when the user turns on the device for the first time, if the boot speed is slow, the user may think that there is a fault in the electronic device. Therefore, how to improve the boot speed of the electronic device has become a problem to be urgently solved in this field of technology. Summary of the invention
[0003] The embodiments of the present application provide a boot acceleration method, device, electronic device and storage medium to solve the technical problems of long boot time and poor user experience of electronic devices.
[0004] On the one hand, the present application provides a boot acceleration method, which is applied to an electronic device based on an Android system, comprising:
[0005] When a power-on instruction is detected, scanning all application programs of the electronic device;
[0006] Classify each of the applications according to a preset classification rule and determine a corresponding compilation method;
[0007] Execute each of the application programs according to the compilation method.
[0008] On the one hand, the present application provides a boot acceleration device, which is applied to an electronic device based on an Android system, including:
[0009] When a power-on instruction is detected, scanning all application programs of the electronic device;
[0010] Classify each of the applications according to a preset classification rule and determine a corresponding compilation method;
[0011] Execute each of the application programs according to the compilation method.
[0012] On the one hand, the present application provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps in the above-mentioned boot acceleration method when executing the computer program.
[0013] On the one hand, the present application provides a computer-readable medium storing a computer program, which, when executed by a processor, implements the steps in the above-mentioned boot acceleration method.
[0014] An embodiment of the present application provides a method for accelerating startup, which includes: when a startup instruction is detected, scanning all applications of the electronic device, classifying each application according to a preset classification rule, determining a corresponding compilation method, and executing each application according to the compilation method, thereby realizing startup of the electronic device. Compared with the traditional dex2oat compilation of all applications, since the compilation method of the application is determined after classification based on the relevant information of the application, the compilation method of each application is the optimal compilation method, which speeds up the compilation speed, greatly improves the loading and compilation speed of the application, realizes acceleration of the startup of the electronic device, and thus improves the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0016] in:
[0017] Figure 1 A flowchart of a method for accelerating startup in one embodiment;
[0018] Figure 2 A flowchart of a method for determining a compilation mode in one embodiment;
[0019] Figure 3 A flowchart of a method for accelerating startup in another embodiment;
[0020] Figure 4 is a flowchart of a method for determining whether an Activity component exists in one embodiment;
[0021] Figure 5 A structural block diagram of a startup acceleration device in an embodiment;
[0022] Figure 6 FIG. 4 is a structural block diagram of an electronic device in an embodiment. DETAILED DESCRIPTION
[0023] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0024] like Figure 1 As shown, in one embodiment, a boot acceleration method is provided, and the boot acceleration method is applied to an electronic device based on an Android system. The boot acceleration method specifically includes the following steps:
[0025] Step 102, when a power-on instruction is detected, all application programs of the electronic device are scanned.
[0026] Among them, the power-on instruction refers to a command sent by a user to an electronic device to power on the electronic device by operating an electronic device based on the Android system. The power-on instruction can be triggered by clicking the power button of the electronic device. After receiving the power-on instruction, the electronic device scans all applications through the package manager. Since the electronic device in this application is an electronic device based on the Android system, it can be seen that the applications are all Android applications, that is, the compilation method of all applications is dex2oat compilation.
[0027] Step 104, classify each application program according to a preset classification rule and determine a corresponding compilation method.
[0028] Among them, the preset classification rule refers to a pre-set rule for classification based on the relevant information of the application. The rule can be a rule for classification based on whether the application has an Activity component, or a rule for classification based on the frequency of use of the application, or a combination of a rule based on whether the application has an Activity component and a rule for classification based on the frequency of use of the application. The specific determination can be made based on the relevant information of the application, and is not limited here. The compilation method refers to the method of loading and executing the application, for example, a verify filter, a quicken filter, a speed-profile filter or a speed filter. According to the type of application, the corresponding compilation method is determined so that the compilation method is the best compilation method for the type of application, that is, the compilation method can improve the compilation speed of the application. In this embodiment, by classifying the application, the types corresponding to different applications are determined, so that the corresponding compilation method can be determined according to the type of application in the future, thereby improving the compilation efficiency of the electronic device for the application, and thereby improving the startup speed of the electronic device.
[0029] Step 106, executing each application program in accordance with the compilation method.
[0030] Specifically, for each application, it is loaded and executed according to the corresponding compilation method. Since the compilation method of the application is determined after classification based on the relevant information of the application, the compilation method of each application is the optimal compilation method, which speeds up the compilation speed. Therefore, for each application, it is executed according to the corresponding compilation method, and the electronic device is started up. Compared with the traditional dex2oat compilation of all applications, the loading and compilation speed of the application is greatly improved, the startup of the electronic device is accelerated, and the user experience is improved.
[0031] The above-mentioned startup acceleration method, when a startup instruction is detected, scans all applications of the electronic device, classifies each application according to the preset classification rules, determines the corresponding compilation method, and executes each application according to the compilation method, thereby realizing the startup of the electronic device. Compared with the traditional dex2oat compilation of all applications, since the compilation method of the application is determined after classification based on the relevant information of the application, the compilation method of each application is the optimal compilation method, which speeds up the compilation speed. The loading and compilation speed of the application is greatly improved, the startup of the electronic device is accelerated, and the user experience is improved.
[0032] like Figure 2 As shown, in one embodiment, the compilation mode includes a first compilation mode and a second compilation mode, and the compilation speed of the first compilation mode is higher than the compilation speed of the second compilation mode. The steps of classifying each application according to a preset classification rule and determining the corresponding compilation mode include:
[0033] Step 104A, determining whether there is an Activity component in each application, determining the application with the Activity component as the first program, and determining the application without the Activity component as the second program;
[0034] Step 104B, calculating a ratio of a first quantity of the first program to a second quantity of the second program;
[0035] Step 104C: when the ratio is greater than a preset threshold, determining that the compilation method of each first program is the first compilation method, and determining that the compilation method of each second program is the second compilation method.
[0036] Among them, the compilation mode includes a first compilation mode and a second compilation mode, and the compilation speed of the first compilation mode is higher than the compilation speed of the second compilation mode. For example, the first compilation mode is one of the verify filter, the second compilation mode quicken filter, the speed-profile filter or the speed filter; for another example, the first compilation mode is the quicken filter, the second compilation mode is the speed-profile filter or the speed filter; for another example, the first compilation mode is the speed-profile filter, the second compilation mode is the speed filter, etc. It is worth noting that the faster the compilation speed, the lower the corresponding execution efficiency, and the execution efficiency of the second compilation mode is higher than the execution efficiency of the first compilation mode. Specifically, according to whether the application has an Activity component, the application is divided into two categories, namely the first program and the second program, wherein the application without an Activity component, such as an application that does not need to interact with the user, and for another example, the theme plug-in of the application, does not have an Activity component. It can be understood that for an application without an Activity component, there is no need to optimize the DEX code. Therefore, for an application without an Activity component, the corresponding compilation mode can be determined to be the compilation mode of the verify filter, reducing the redundant optimization operations on the DEX code without an Activity component, and improving the compilation speed. Therefore, if the proportion of applications without Activity components among the applications installed in the electronic device is larger, the compilation time is shorter compared with the same number of applications. Therefore, in order to ensure that the loading and compilation time of the applications is reduced to a certain extent, the ratio of the number of applications without Activity components to the number of applications with Activity components is calculated. The ratio is positively correlated with the proportion of the number of applications without Activity components. That is, the larger the ratio, the larger the proportion of the number of applications without Activity components. When the ratio is greater than a preset threshold, for example, the preset threshold may be 20%, 30% or 40%, etc., that is, when the ratio is large enough, the compilation method of each first program is determined to be the first compilation method, and the compilation method of each second program is determined to be the second compilation method. Therefore, the more applications use the first compilation method, and since the compilation speed of the first compilation method is higher than the compilation speed of the second compilation method, the compilation time of the first program is greatly reduced, and the startup speed of the electronic device is greatly improved.
[0037] like Figure 3 As shown, in one embodiment, after the step of calculating the ratio of the first number of the first program to the second number of the second program, the method further includes:
[0038] Step 104D, when the ratio is less than or equal to the preset threshold, obtaining the popularity score of each application;
[0039] Step 104E, determining that the compilation method of the applications ranked in the bottom N percent of the popularity score value is the first compilation method, and determining that the compilation methods of the remaining applications are the second compilation method, where N is a positive number less than 100.
[0040] In this embodiment, when the ratio is less than or equal to a preset threshold, that is, the number of first programs is less than the number of second programs, that is, the number of applications without Activity components is relatively small. In order to ensure that the loading and compilation time of the application is reduced to a certain extent, the corresponding compilation type is determined according to the popularity score of each application. Specifically, a correspondence table between the popularity of the application and the popularity score is pre-configured, wherein the popularity of the application and the popularity score are positively correlated, that is, the higher the popularity of the application, the higher the corresponding popularity score. The popularity score of each application is determined according to the correspondence table. It is worth noting that the higher the popularity of the application, the more frequently the user uses it. Therefore, in order to ensure the user experience, it is necessary to ensure that the execution efficiency of this type of application meets certain requirements. Therefore, the compilation method of this type of application is determined to be a compilation method with a compilation speed lower than the first compilation method, that is, the second compilation method, to ensure user experience. The lower the popularity of an application, the less frequently it is used by users. Therefore, users are less aware of this type of application. Thus, the compilation method of the applications ranked in the bottom N percent in terms of popularity score, i.e., the bottom N percent (e.g., N=40, 50, or 60, etc.) of applications with lower popularity scores, is determined to be the first compilation method, which reduces the compilation time of a certain percentage of applications and ensures that users are unaware of this type of application, further improving the compilation speed of the application, and improving the startup speed of the electronic device and the user experience.
[0041] like Figure 4 As shown, in one embodiment, the step of determining whether there is an Activity component in each application includes:
[0042] Step 104A1, obtaining the apk package name of each application;
[0043] Step 104A2: parse each apk package name to determine whether the corresponding application program contains an Activity component.
[0044] The apk package name refers to the unique identifier of an application in the Android system. Specifically, it can be obtained by viewing the application source code (such as the "AndroidManifest.xml" file), by viewing the directory (such as the / data / data / directory), or by using the Android system's tools. Then, the dumpsyspackage command is used to parse the apk package name, obtain the basic information of the corresponding application, and determine whether it contains the Activity component based on the basic information.
[0045] In one embodiment, the step of obtaining the apk package name of each application includes: obtaining the apk path of each application; and determining the apk package name according to each apk path.
[0046] Specifically, using the tools provided by the Android system, when PackageManagerService optimizes the application, the apk path is passed in, and the apk package name is obtained using pm list package -f according to the apk path.
[0047] In one embodiment, the first compilation mode is a verify filter, and the second compilation mode is a quicken filter.
[0048] Among them, the verify filter only runs DEX code verification, and the quicken filter runs DEX code for verification and optimization. It can be understood that the verify filter and the quicken filter are the two with the fastest compilation speeds among the four official filters in the Android system, and the quicken filter can ensure the execution efficiency of the application. Therefore, the first compilation method is selected as the verify filter and the second compilation method is the quicken filter, which greatly improves the loading and compilation speed of the application, ensures the execution efficiency of the second program, and further improves the boot speed and user experience of electronic devices.
[0049] In one embodiment, the steps of executing each application program in a compiling manner include: verifying the DEX code of each first program; and verifying and optimizing the DEX code of each second program.
[0050] Specifically, the DEX code of each first program is verified, which avoids redundant compilation and greatly improves the compilation speed. Since the DEX code of the first program is verified, the user perception is also reduced. The DEX code of each second program is verified and optimized, which improves the execution efficiency of the second program and enhances the user experience. It can be understood that in this embodiment, by verifying the DEX code of each first program and verifying and optimizing the DEX code of each second program, while greatly improving the compilation speed of the first program and the second program, the user's perception of the first program is reduced, and the execution efficiency of the second application is improved, which greatly improves the user's boot experience.
[0051] like Figure 5 As shown, in one embodiment, a startup acceleration device is provided, comprising:
[0052] The scanning module 502 is used to scan all application programs of the electronic device when a power-on instruction is detected;
[0053] The classification module 504 is used to classify each of the applications according to a preset classification rule and determine a corresponding compilation method;
[0054] The execution module 506 is used to execute each of the application programs according to the compilation method.
[0055] In one embodiment, the classification module includes:
[0056] A determination submodule, used for determining whether there is an Activity component in each of the applications, determining the application with the Activity component as the first program, and determining the application without the Activity component as the second program;
[0057] a calculation submodule, configured to calculate a ratio of a first quantity of the first program to a second quantity of the second program;
[0058] The first determining submodule is used to determine that the compilation mode of each of the first programs is the first compilation mode, and determine that the compilation mode of each of the second programs is the second compilation mode when the ratio is greater than a preset threshold.
[0059] In one embodiment, the determination submodule includes:
[0060] An acquisition unit, used to acquire the apk package name of each of the applications;
[0061] The parsing unit is used to parse each of the apk package names to determine whether the corresponding application program includes an Activity component.
[0062] In one embodiment, the parsing unit includes:
[0063] An acquisition subunit, used to acquire the apk path of each of the applications;
[0064] A determination subunit is used to determine the apk package name according to each apk path.
[0065] In one embodiment, the execution module includes:
[0066] A first execution unit, configured to verify the DEX code of each of the first programs;
[0067] The second execution unit is used to verify and optimize the DEX code of each of the second programs.
[0068] Figure 6 FIG. 1 shows an internal structure diagram of an electronic device in an embodiment. The electronic device may be a server, including but not limited to a high-performance computer and a high-performance computer cluster. Figure 6 As shown, the electronic device includes a processor, a memory and a network interface connected via a system bus. The memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium of the electronic device stores an operating system and may also store a computer program. When the computer program is executed by the processor, the processor may implement the boot acceleration method. The internal memory may also store a computer program. When the computer program is executed by the processor, the processor may implement the boot acceleration method. Those skilled in the art will understand that Figure 6 The structure shown in the figure is merely a block diagram of a partial structure related to the scheme of the present application, and does not constitute a limitation on the electronic device to which the scheme of the present application is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
[0069] In one embodiment, the boot acceleration method provided by the present application can be implemented in the form of a computer program. The computer program can be Figure 6 The electronic device shown in FIG. 1 is executed on the electronic device. The memory of the electronic device may store various program templates constituting the boot acceleration device, such as a scanning module 502 , a classification module 504 , and an execution module 506 .
[0070] An electronic device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program: when a power-on instruction is detected, scanning all application programs of the electronic device; classifying each application program according to a preset classification rule and determining a corresponding compilation method; and executing each application program according to the compilation method.
[0071] In one embodiment, the compilation mode includes a first compilation mode and a second compilation mode, and the compilation speed of the first compilation mode is higher than the compilation speed of the second compilation mode. The step of classifying each of the applications according to a preset classification rule and determining the corresponding compilation mode includes: judging whether there is an Activity component in each of the applications, determining the application with the Activity component as the first program, and determining the application without the Activity component as the second program; calculating the ratio of a first number of the first programs to a second number of the second programs; when the ratio is greater than a preset threshold, determining that the compilation mode of each of the first programs is the first compilation mode, and determining that the compilation mode of each of the second programs is the second compilation mode.
[0072] In one embodiment, after the step of calculating the ratio of the first number of the first programs to the second number of the second programs, the step further includes: when the ratio is less than or equal to a preset threshold, obtaining the popularity score of each of the application programs; determining that the compilation method of the application programs ranked in the bottom N percent of the popularity score value is the first compilation method, and determining that the compilation method of the remaining application programs is the second compilation method.
[0073] In one embodiment, the step of determining whether there is an Activity component in each of the applications includes: obtaining an apk package name of each of the applications; and parsing each of the apk package names to determine whether the corresponding application contains an Activity component.
[0074] In one embodiment, the step of obtaining the apk package name of each of the applications includes: obtaining the apk path of each of the applications; and determining the apk package name according to each of the apk paths.
[0075] In one embodiment, the first compilation mode is a verify filter, and the second compilation mode is a quicken filter.
[0076] In one embodiment, the step of executing each of the application programs in accordance with the compilation method includes: verifying the DEX code of each of the first programs; and verifying and optimizing the DEX code of each of the second programs.
[0077] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented: when a power-on instruction is detected, all applications of the electronic device are scanned; each of the applications is classified according to a preset classification rule and a corresponding compilation method is determined; and each of the applications is executed according to the compilation method.
[0078] In one embodiment, the compilation mode includes a first compilation mode and a second compilation mode, and the compilation speed of the first compilation mode is higher than the compilation speed of the second compilation mode. The step of classifying each of the applications according to a preset classification rule and determining the corresponding compilation mode includes: judging whether there is an Activity component in each of the applications, determining the application with the Activity component as the first program, and determining the application without the Activity component as the second program; calculating the ratio of a first number of the first programs to a second number of the second programs; when the ratio is greater than a preset threshold, determining that the compilation mode of each of the first programs is the first compilation mode, and determining that the compilation mode of each of the second programs is the second compilation mode.
[0079] In one embodiment, after the step of calculating the ratio of the first number of the first programs to the second number of the second programs, the step further includes: when the ratio is less than or equal to a preset threshold, obtaining the popularity score of each of the application programs; determining that the compilation method of the application programs ranked in the bottom N percent of the popularity score value is the first compilation method, and determining that the compilation method of the remaining application programs is the second compilation method.
[0080] In one embodiment, the step of determining whether there is an Activity component in each of the applications includes: obtaining an apk package name of each of the applications; and parsing each of the apk package names to determine whether the corresponding application contains an Activity component.
[0081] In one embodiment, the step of obtaining the apk package name of each of the applications includes: obtaining the apk path of each of the applications; and determining the apk package name according to each of the apk paths.
[0082] In one embodiment, the first compilation mode is a verify filter, and the second compilation mode is a quicken filter.
[0083] In one embodiment, the step of executing each of the application programs in accordance with the compilation method includes: verifying the DEX code of each of the first programs; and verifying and optimizing the DEX code of each of the second programs.
[0084] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the program can be stored in a non-volatile computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0085] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0086] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A startup acceleration method, applied to an electronic device based on an Android system, characterized in that: include: When a power-on instruction is detected, scanning all application programs of the electronic device; Classify each of the applications according to a preset classification rule and determine a corresponding compilation method; Execute each of the applications according to the compilation method; The compilation mode includes a first compilation mode and a second compilation mode, and the compilation speed of the first compilation mode is higher than the compilation speed of the second compilation mode. The step of classifying each of the application programs according to a preset classification rule and determining the corresponding compilation mode includes: Determine whether there is an Activity component in each of the applications, determine the application with the Activity component as the first program, and determine the application without the Activity component as the second program; Calculating a ratio of a second number of the second program to a first number of the first program, wherein the ratio is positively correlated with a proportion of the number of the second program; When the ratio is greater than a preset threshold, the compilation mode of each of the first programs is determined to be the first compilation mode, and the compilation mode of each of the second programs is determined to be the second compilation mode.
2. The startup acceleration method according to claim 1, characterized in that: After the step of calculating the ratio of the first number of the first program to the second number of the second program, the method further includes: When the ratio is less than or equal to a preset threshold, the popularity score of each of the applications is obtained; Determine that the compilation method of the application programs ranked in the bottom N percent of the heat score value is the first compilation method, and determine that the compilation methods of the remaining application programs are the second compilation method, where N is a positive number less than 100.
3. The startup acceleration method according to claim 1, characterized in that: The step of determining whether there is an Activity component in each of the applications comprises: Obtain the apk package name of each of the applications; Parse each of the apk package names to determine whether the corresponding application program includes an Activity component.
4. The startup acceleration method according to claim 3, characterized in that: The step of obtaining the apk package name of each application comprises: Obtain the apk path of each of the applications; Determine the apk package name according to each apk path.
5. The startup acceleration method according to claim 1, characterized in that: The first compilation mode is a verify filter, and the second compilation mode is a quicken filter.
6. The startup acceleration method according to claim 5, characterized in that: The step of executing each of the applications in the compilation mode includes: Verifying the DEX code of each of the first programs; The DEX code of each of the second programs is verified and optimized.
7. A startup acceleration device, applied to an electronic device based on an Android system, characterized in that: include: A scanning module, configured to scan all application programs of the electronic device when a power-on instruction is detected; A classification module, used to classify each of the applications according to a preset classification rule and determine a corresponding compilation method; An execution module, used for executing each of the application programs according to the compilation method; The compilation mode includes a first compilation mode and a second compilation mode, and the compilation speed of the first compilation mode is higher than the compilation speed of the second compilation mode, and the classification module includes: A determination submodule, used for determining whether there is an Activity component in each of the applications, determining the application with the Activity component as the first program, and determining the application without the Activity component as the second program; a calculation submodule, configured to calculate a ratio of a second number of the second programs to a first number of the first programs, wherein the ratio is positively correlated with a proportion of the number of the second programs; The first determining submodule is used to determine that the compilation mode of each of the first programs is the first compilation mode, and determine that the compilation mode of each of the second programs is the second compilation mode when the ratio is greater than a preset threshold.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the boot acceleration method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the startup acceleration method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Method, device and system for compiling software
CN105138387A
Application program processing method and device and storage medium
CN112256274A