Optimizing Render Performance

최희창·2023년 4월 2일
0

Jetpack Compose

목록 보기
7/9

참고 자료

  1. https://getstream.io/blog/jetpack-compose-guidelines/#rules-for-writing-classes
  2. https://www.youtube.com/watch?v=Ry-3xlElUe4
  3. https://medium.com/androiddevelopers/why-should-you-always-test-compose-performance-in-release-4168dd0f2c71
  4. https://www.youtube.com/watch?v=EVVFhyuVV5g

Introduction

onResume이 호출되고 난 후 2가지가 발생한다.
첫번째는 Screen은 처음 Frame을 계산하고 두 번째는 Screen에 그려준다.

Guide for Faster Composable Renders

  1. Make sure R8 is configured to minify all Composables
  2. More ComposeViews == Slower Render Time
  3. The first Composable you render is slower than subsequent composables.
  4. Use State and Remember { } to minimize calculation within your Composables.
  5. Use keys to allow compositions to reorder and limit costly recomposition
  6. Understand how JIT compilation will impact initial and subsequent renders

Perfetto.dev

profile
heec.choi

0개의 댓글