FilesLast commitLast update
1 year ago
7 months ago
1 year ago
1 year ago
1 year ago
8 months ago
8 months ago
1 year ago
1 year ago
1 year ago
1 year ago
README

Reducing App Cold Start Latency

Overview

This sample accompanies the "Reducing App Cold Start Latency" best practice.

How to Use

N/A

Project Directory

├──entry/src/main/ets 
│  ├──entryability 
│  │  └──EntryAbility.ets                   // Entry ability 
│  ├──entrybackupability 
│  │  └──EntryBackupAbility.ets             // Data backup and restoration 
│  ├──pages 
│  │  ├──ColdStartSlow.ets                  // Example of slow cold start 
│  │  ├──ColdStartSpeedOptimization.ets     // Example of quick cold start 
│  │  ├──ComputeTaskAsync.ets               // Example of asynchronous tasks 
│  │  ├──ImportMainPage.ets                 // Example of page import 
│  │  ├──ImportMainPageDemo.ets             // Example of reducing the number of imported files 
│  │  ├──ImportSubPage.ets                  // Sub-page import 
│  │  ├──Index.ets                          // App home page 
│  │  ├──NewIndex.ets                       // Home page that displays network images 
│  │  ├──NotRecommendDemo.ets               // Example of import that is not recommended 
│  │  ├──ReduceImport.ets                   // Example of reducing the number of imports 
│  │  ├──ScenariosExample.ets               // Example of secondary network refresh 
│  │  └──SecondPage.ets                     // Redirection page 
│  └──utils 
│     ├──Calculator.ets                     // Encapsulation of time-consuming calculation functions 
│     └──NetRequest.ets                     // Network request utility class 
├──entry/src/main/resources                 // App resources 
└──library                                  // Static resource sharing package 
   ├──src/main/ets/components/mainpage 
   │  ├──MainPgge.ets                       // Home page of the static resource package 
   │  └──SubPage.ets                        // Sub-page of the static resource package 
   ├──Index.ets                             // Entry file, which exposes the module methods 
   ├──IndexAppStart.ets                     // Split export file for MainPage 
   ├──IndexOthers.ets                       // Split export file for SubPage 
   └──src/main/resources                    // Static resources

Required Permissions

N/A

Constraints

  • This sample is only supported on Huawei phones running standard systems.
  • The HarmonyOS version must be HarmonyOS 5.0.5 Release or later.
  • The DevEco Studio version must be DevEco Studio 5.0.5 Release or later.
  • The HarmonyOS SDK version must be HarmonyOS 5.0.5 Release SDK or later.