This application provides an application installation method, apparatus, device, and medium based on compilation optimization, relating to the field of
computer technology. The method includes: in response to an installation operation on a target application, obtaining an application
package corresponding to the target application; extracting baseline configuration files for various scenarios included in the application
package; installing the target application based on the application
package, and compiling hotspot code corresponding to a first configuration file that meets the compilation requirements during installation from the baseline configuration files for each
scenario; and, when it is determined that the electronic device is in an idle state, compiling hotspot code corresponding to a second configuration file (excluding the first configuration file) from the baseline configuration files for each
scenario, thereby completing the installation of the target application. This method aims to save resources, improve performance, and enhance the user experience.