Jetpack Compose Improves Performance |
Written by Kay Ewbank | |||
Tuesday, 30 January 2024 | |||
Google has released version 1.6 of Jetpack Compose as part of its larger Compose January '24 Bill of Materials release. Google says this release largely focuses on performance improvements, courtesy of continued migration modifiers and improvement of the efficiency of major parts of the underlying API. Android Jetpack is a suite of libraries for use in Android app development, and Compose is Android's modern, native UI toolkit that is Google's recommended way to build new Android apps for phone, tablets and foldables, and the addition of Compose for Wear adds the option of building Wear OS apps too. The performance improvements, according to Google, have resulted in around a twenty percent improvement in scroll performance and a twelve percent improvement in startup time in Google's benchmarks, on top of the improvements from the August '23 release. The developers say that as with the earlier release, most apps will see these benefits just by upgrading to the latest version, with no other code changes needed. The improvements have come from work on memory allocations and lazy initialization, to ensure the framework is only doing work when it has to. The new version also includes an updated Compose compiler that has a new option that can be used to mark any class as stable, including your own modules, external library classes, and standard library classes, without having to modify these modules or wrap them in a stable wrapper class. The code generated by the Compose compiler plugin has also been improved, providing more performance improvements, and to enable "intrinsic remember" by default. This means the compiler remembers to take into account information it already has about any parameters of a composable, so speeding up the calculation of determining if a remembered expression needs reevaluating. The developers say they have also added support for an experimental mode called "strong skipping mode" that relaxes some of the rules about which changes can skip recomposition, moving the balance towards what developers expect. With strong skipping mode enabled, composables with unstable parameters can also skip recomposition if the same instances of objects are passed in to its parameters. Jetpack Compose 1.6 is available now. More InformationRelated ArticlesAndroid Jetpack Wear OS Libraries Now Stable Android Jetpack Confusion As V1 Approaches Google Jetpack Compose UI Toolkit Now In Beta Android Jetpack Compose Is Welcome, But What About The Churn? To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.
Comments
or email your comment to: comments@i-programmer.info |
|||
Last Updated ( Tuesday, 30 January 2024 ) |