Home > Software design >  Disable partial compiling (updates) to UI in Android Studio
Disable partial compiling (updates) to UI in Android Studio

Time:12-07

By default, Android Studio will detect changes to your code and apply the changes to UI while the app is running. This is great but only works for minor changes like changing color, fontsize, etc. But what I have noticed is that over time, Android Studio becomes really laggy in performance as the app grows in code size. The biggest performance hit is when the app is running in debug mode and I make changes. If I run the app but not in debug mode, it is still laggy but not as much. Typing in code gets a lot of freezes.

Is there a way to disable this automatic compiling of changes and updating the UI?

CodePudding user response:

Search for Live Edit Of Literals in settings you will find an option to enable and disable Live Edit Of Literals as shown in below image

enter image description here

CodePudding user response:

After some testing, it appears that this performance issue is related to the amount of code in the file you are editing. The file I was editing had a very large amount of code in it - 850 lines / 32k. But when I tried editing a file with significantly less code, there was no performance issues. Google needs to address this issue. A temporary fix is to break up the larger code into smaller files.

  • Related