An app/atomic service is considered to have poor performance if it encounters the following symptoms when running: slow response, choppy animations, app crash, high power consumption, and device overheating. The poor performance may be caused by misuse of system APIs or memory leak due to improper holding of ArkTS objects. All these result in improper use of system resources, including the CPU, memory, network, file, GPU, and peripherals.
Performance profiling typically focuses on reducing load, either permanently or temporarily.
When these issues arise, monitor app performance and device resource consumption to identify and locate the root cause, then reduce the load accordingly.
CodeLinter provides static code scanning, checking code for performance rule violations to detect potential issues and help analyze and fix problematic code.
DevEco Profiler provides the Realtime Monitor to comprehensively monitor device resources, covering system events, exception reports, CPU usage, memory usage, real-time frame rate, GPU usage, energy consumption, and network traffic consumption. It facilitates top-down, layered analysis and allows you to jump directly to the corresponding code. You can perform white-box analysis based on the code to pinpoint unnecessary workloads, identify performance bottlenecks, and demarcate the problem.
This chapter focuses on the DevEco Profiler. For details on CodeLinter and AppAnalyzer, refer to their respective documentation.