In MIUI (an Android ROM) there is an option in developer settings called MIUI optimization, what is the use of this option.When this option is enabled an app can't be installed via USB (i.e. from android studio). If this option is disabled, does the performance of phone decrease?
According to this thread, this feature (Turn On MIUI Optimization)
enables a plethora of MIUI based settings & optimizations as per the guidelines set by the MIUI developers.
It helps to load the app and the app data in parallel reducing load times and ensuring slicker user experience.
However, this setting can sometimes cause a variety of issues on non-MIUI based apps such as Google Apps & Apps from Google Playstore.Users have recommeneded disabling the feature if you rely on Google Playstore for apps & services or use Global Stable or Global Beta MIUI ROMs.
Here is a summary of observable changes when this feature is turned on or off:
With the MIUI Optimization Enabled, some users reported the following issues
- Cannot set third-party launcher like Nova, Apex or Google Now launcher.
- Wallpaper cannot be set using in-built options via custom launchers.
- Occasional lags, stutters or freezes while scrolling web-pages & long lists.
- Custom apps set as default restore to default MIUI apps on reboot. (Only on MIUI China ROMs)
- Cannot set accessibility services on reboot.
- Background apps cannot sync data.
- Music players stop playing after sometime.
- UI Animations are not synced properly.
After turning off MIUI optimization
- Above issues may get solved.
- Settings → Data Usage → Graph changes to AOSP style.
- Settings → Battery & Performance → Battery Use → Graph changes to AOSP style.
- Settings → Installed Apps → All → Documents → It will not be disabled after every reboot.
- Settings → Additional Settings → Buttons → Settings may get reset.
- No OTA update notifications. Enable it to receive the OTA updates.
In addition to @xavier_fakerat's answer, note that the "MIUI Optimizations" prevent the installers of various applications from launching correctly even on the phone itself, rather than over-USB. If you get unexpected "Installation failed" messages (not taking about Google Play Store; I never use that) - it might be a conflict between the installer and the MIUI optimization mechanism.
when i have this issue : it was because the internal sd disk was quite plenty, so i transferred the applications in the external disk, a sd drive on phone. After that, it worked. the advices above dont work for android 4.0.1, i didnt find instant run after file/settings/build, execution, deployment.