Skip to content

Baseline Profile 적용#100

Open
chlwhdtn03 wants to merge 1 commit intodevelopfrom
feat/baseline-profile
Open

Baseline Profile 적용#100
chlwhdtn03 wants to merge 1 commit intodevelopfrom
feat/baseline-profile

Conversation

@chlwhdtn03
Copy link
Collaborator

📝작업 내용

Baseline Profile 방식을 적용해서 앱의 초기 동작 속도를 높였습니다.

앱을 실행시키고 화면의 로딩이 완료될때까지 최대 0.07초 빠르게,
앱을 실행시키고 성적 탭, 채플 탭을 모두 방문할 때까지 최대 1.48초 빨라졌습니다.

사용법

Baseline Profile을 생성하기 위한 매크로 테스트과정이 필요합니다.

local.properties에

usaint_id=20221234
usaint_pw=passowrd

유세인트 로그인이 가능한 id, pw을 추가해주시면 됩니다.

Baseline Proofile 생성은 배포하기 직전에만 해주시면 됩니다.

Android Studio 2026 01 13 214900@2x

Generate Baseline Profile For App 눌러준 후

app 모듈에
Android Studio 2026 01 13 215035@2x

baseline-prof.txt, startup-prof.txt가 생겼는지 확인하면 됩니다

Baseline Profile 생성 과정에서 매크로가 직접 버튼 눌러주니까 에뮬레이터 건드리시면 안됩니다!

이후에 그대로 테스트, 배포 진행하면 baseline-prof.txt가 반영된 상태로 앱이 실행됩니다.

💬리뷰 요구사항(선택)

Gemini 말로는

  ① 리플렉션(Reflection)을 쓰는 경우
  코드 내부에서 문자열(String)로 클래스나 함수를 찾을 때입니다.
   * 코드: Class.forName("com.example.User")
   * 문제: ProGuard가 User 클래스 이름을 A로 바꿔버리면, 코드는 여전히 "com.example.User"라는 이름으로 찾으려 하다가 에러가 납니다.

  ② 네이티브 코드(JNI, JNA)와 통신할 때 (작성자님 케이스!)
  C, C++, Rust 같은 외부 언어와 연결될 때입니다.
   * 상황: Rust 코드는 자바의 com.example.NativeFunction을 부르려고 기다립니다.
   * 문제: 자바 쪽에서 ProGuard가 이름을 a.b.c로 바꿔버리면 Rust가 "어? 약속한 함수가 없네?" 하고 뻗어버립니다. 그래서 아까 `rusaint`와 `jna` 설정을 추가한 것입니다.

  ③ 데이터 직렬화 (Serialization - JSON 변환 등)
  서버에서 받은 JSON 데이터를 자바 객체로 변환할 때(GSON 등 사용 시)입니다.
   * JSON: {"name": "choi"}
   * 코드: class User { val name: String }
   * 문제: name 변수가 a로 바뀌면, JSON의 "name"과 매칭이 안 돼서 데이터가 텅 비게 됩니다. (단, @SerializedName 같은 어노테이션을 잘 붙이면 괜찮습니다.)

그래서 지금 proguard 파일 상태로 일단 올렸습니다!

Copy link
Collaborator

@minjun011026 minjun011026 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수고하셨습니다~!

) {
LinearProgressIndicator(Modifier.fillMaxWidth())
LinearProgressIndicator(Modifier.fillMaxWidth().semantics {
contentDescription = "선형로딩" // baseline-Profile
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

제가 알기로는 contentDescription은 접근성 서비스 사용자를 위한 컴포넌트 설명으로 알고 있습니다.
그런데 이 "선형로딩" 이라는 용어는 사용자 관점이 아닌 개발자 관점의 용어라고 생각됩니다.
또한 제가 보기에는 이것의 목적도 baseline profile에서의 단계 표시로 보이는데 testTag 대신 contentDescription을 사용하신 이유가 있을까요?(진짜 몰라서 물어봄)

다른 곳에서도 위와 같은 부분들이 보이는데 어떤 이유인지 알려주시면 감사하겠습니당

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants