iOS High Performance and High Performance+ Modes
High Performance Mode
In the iOS environment, the standard WASM runtime mode has no JIT, which imposes relatively large limitations on games with high computation performance requirements. Common situations are:
Low- and mid-end devices have low frame rates, and smoothness is hard to reach the standard for going live. CPU computing resource consumption is too high, and after running for a while the device temperature keeps rising.
The Runtime is based on the WKwebView component provided by iOS, to enjoy the huge benefits of JIT.
High Performance+ Mode
High Performance+ mode is an upgrade over High Performance mode. It replaces the WebGL rendering implementation in WKwebView, and migrates and independently takes over the rendering process.
How to Enable
High Performance Mode Limitations
Memory Limit
In High Performance mode, the memory limit for iOS low-end 2G RAM devices (6s/7/8, etc.) is 1G, and for mid- and high-end 3G+ RAM devices (7P/8P/iPhoneX/XSAMX/11/12, etc.) it is 1.5G (a safe memory recommendation of 1.2G~1.3G), so developers must ensure the peak memory does not exceed this value.
Developers can refer to the guide Memory Optimization.
Code Size Limit
In High Performance mode, WASM code is compiled and optimized, requiring more compilation consumption and memory. Before optimization, you can clearly feel the device heating during the startup phase (such as within the first 1 minute of startup).
When publishing to production, it is especially recommended to use these optimization techniques: WASM code sub-packaging + texture compression + UnityHeap reservation.
QA
1. Why does the game heat up so much at startup when High Performance mode is enabled?
- Without code sub-packaging, JIT compilation optimization consumes a lot of performance.
2. In High Performance mode, is it okay to publish to production without optimizing memory or the WASM code package size?
- Not recommended. Although iOS High Performance mode can improve runtime computing power, it has more stringent requirements for memory and WASM package size, requiring more effort to optimize. Without any optimization, you are very likely to encounter crashes from exceeding the memory limit and severe heating at startup. When publishing to production, it is especially recommended to use these optimization techniques: WASM code sub-packaging + texture compression + UnityHeap reservation.
