Recently, I have seen many people asking Windows Phone 8CodeObfuscation is not necessary because WP8 applications are compiled by compiler in the cloud MDIL.
What is compiler in the cloud?
The above is an original description of msdn. Although the xap compiled by Visual Studio in Windows Phone 8 is a machine independent common intermediate Lanuage (CEL) file, which is equivalent to msil, of course, this file is submitted on the dev center, but the dev center will perform a re-compilation (compile in the cloud) before publishing your uploaded server to the app store) machine independent common intermediate Lanuage (CEL) is compiled into machine dependent intermediate language (MDIL). Of course, MDIL is safe. First, MDIL compilation will not affect the application.ProgramIts own functions and stability, and the next compilation is native code (local code compilation also does not have to worry about the risk of decompilation) the startup and running speed of your program on Windows Phone 8 will also be optimized.
What are the benefits of MDIL?
First, MDIL compilation is performed on the cloud. It seems that nothing is actually done. In fact, all of this is automatically executed. You don't have to worry about the impact of Windows Phone 7.x applications, that is to say, when a Windows Phone 7 user downloads an application, it still provides the same JIT compilation package as before. Only Windows Phone 8 users can get a package compiled by optimized MDIL.
In addition, compared with applications compiled by MDIL (compared with Windows Phone 8 and Windows Phone 7), both the startup speed and running effect can be improved by 50% or more.
We can clearly see the entire process:
Of course, we can also simulate and debug optimized native image locally.
First, we can no longer directly test the native code on Windows Phone emulator to depend on the real device, so we need to select the deployment device as the device on standard.
Use Alt + F5 to run the test or Alt + F5 For performance analysis.
Debug optimized native Image
Select Tools-options in Visual Studio
Remove the suppress JIT Optimization on module load and enable just my code options
Of course, some students or projects insist on code obfuscation. As far as I know, the dotfuscator Professional version currently supports WP8 code obfuscation.
Download link http://www.preemptive.com/products/dotfuscator/compare-editions
welcome to communicate with me or on Sina Weibo @ Wang Bo _ Nick