Posted on

Compose Performance

https://github.com/skydoves/compose-performance

📚 Curated articles to understand Compose internals and optimize Jetpack Compose performance.

Understanding the Jetpack Compose mechanism is important, as it directly impacts your application’s performance. Jetpack Compose introduces a new paradigm in declarative UI, driving innovative UI techniques. While the benefits of declarative UI are significant, it also presents challenges in terms of stability and UI updates. This issue is not unique to Jetpack Compose; it also affects other declarative UI frameworks like React and Flutter. These challenges are inherent to all frameworks that use a declarative approach and we can learn across all those various frameworks.

Posted on

How to Allocate More Than 8GB RAM for Android Studio?

People discuss jvm options.

-Xms512m
-Xmx4g
-XX:+HeapDumpOnOutOfMemoryError
-XX:-OmitStackTraceInFastThrow
-XX:+IgnoreUnrecognizedVMOptions
-XX:MaxJavaStackTraceDepth=10000
-ea
-Dsun.io.useCanonCaches=false
-Dsun.java2d.metal=true
-Djbr.catch.SIGABRT=true
-Djdk.http.auth.tunneling.disabledSchemes=""
-Djdk.attach.allowAttachSelf=true
-Djdk.module.illegalAccess.silent=true
-Dkotlinx.coroutines.debug=off
-XX:CICompilerCount=2
-XX:ReservedCodeCacheSize=512m
-XX:+UnlockDiagnosticVMOptions
-XX:TieredOldPercentage=100000
-XX:SoftRefLRUPolicyMSPerMB=50
-Dapple.awt.application.appearance=system
Posted on

perfetto

perfetto is a tool that lets you collect performance information from Android devices via the Android Debug Bridge (ADB). Invoke the perfetto tool using the adb shell perfetto ... command. perfetto uses various sources to collect performance traces from your device, such as:

  • ftrace for information from the kernel
  • atrace for user-space annotation in services and apps
  • heapprofd for native memory usage information of services and apps

This page describes how to call perfetto and configure it to generate the desired output. For further information, refer to the perfetto documentation.

https://ui.perfetto.dev/