Search code examples
androidkotlinoptimizationandroid-jetpack-compose

What is `isLiveLiteralsEnabled` function in the Compose runtime and how do I disable its use?


I am developing an app using Jetpack Compose.

The algorithmic parts of this application were acting slow and hence I started profiling the app.

The function which is consuming most of the time, according to the profiler, is isLiveLiteralsEnabled() which is part of the Compose runtime. And this is getting called in the most innocuous places, such as integer additions within nested loops.

As I understand it, the compose compiler plugin is instrumenting the code for some reason.

What is this reason? And how do I disable / workaround it?


Solution

  • You can disable those by clicking on bottom-right icon in the android studio.

    [![enter image description here][1]][1]