Document directory
- Performance Improvement Plan
- View app Performance
- Best practices for Metro style app Performance
I. Overview
During development, you should pay attention to program performance issues as early as possible and treat performance issues as a development function, because this greatly affects the user experience.
Performance Improvement Plan
Performance should be written into the plan like every function in the app. The performance improvement plan includes: In what scenarios is performance critical? Define what is good performance? And focus on performance as early as possible to ensure that the goal can be achieved in the later stage. You don't need to know exactly where you need to improve performance. Generally, the most frequently executed code is where you need to optimize it. User Experience is the basic way to measure performance. For example, the startup time of an app is excellent within 1 second, and the performance is less than 5 seconds. Sometimes you have to consider other factors that do not directly affect the user experience, such as memory consumption. If the app uses too much memory, the machine will slow down. For more information about how to meet our performance requirements, you can also pay attention to the size of the app. For example, you may need an app that does not consume much memory.
View app Performance
In the prototype, development, and deployment phases of the project, performance calculation methods are different. For details about how to use Visual Studio to view app performance, see analyzing the performance of Windows Metro style apps.
In the early stages of the prototype stage, it will bring many benefits to the program performance. We recommend that you check the performance when writing code. Focusing on performance earlier will let you know where the performance overhead is, in this way, you can adjust some decisions, and it will be very troublesome to pay attention to them later. During development, check whether the performance is correct and check whether the architecture needs to be adjusted, such as data expression. There is no need to optimize each part of the program. The performance improvement of most parts will not bring any difference to users, and the most common functions will be improved. Win8 can run on multiple devices, so it is difficult to simulate all the scenarios. Collecting performance data on users' machines can help you understand the expectations of end users. You can upload data to our server through WebService.
Best practices for Metro style app Performance
- Test on a low-power device, such as a tablet.
Reduce power consumption: Reduce Unnecessary scheduled tasks when the CPU is idle. For example, you may extract data from WebService and retrieve data from GPS. It is best not to perform these operations too frequently. Animation is also expensive, because the video card and CPU have to be active all the time, the animation effect is very good, but as a factor to improve performance, it is best to use less animation for data-based apps.
- Reduce memory consumption
Related content: guidelines for improving the performance of C # and VB Metro style apps