Skip to content

TodayTab의 View 구성 요소와 렌더링 입력을 분리한다 - #943

Merged
opficdev merged 1 commit into
developfrom
refactor/#881
Oct 28, 2026
Merged

opficdev merged 1 commit into
developfrom
refactor/#881

Conversation

@opficdev

@opficdev opficdev commented Oct 28, 2026 •

Copy link
Copy Markdown
Collaborator

🔗 연관된 이슈

🎯 의도

계산 프로퍼티로 구성한 내부 View는 그 안에서 읽은 상태가 바뀌면 부모 View의 body 전체가 다시 평가되는 구조

상태 변화로 재평가가 필요한 영역만 별도 View로 분리하고, 해당 상태를 부모가 아닌 분리한 View의 body에서 읽도록 구성하여 부모 body의 재평가 범위를 줄이는 것

📝 작업 내용

📌 요약

  • TodayView에서 상태를 읽는 영역을 같은 파일의 private View로 분리

🔍 상세

  • TodayView
    • 상태를 읽는 영역을 store를 전달받는 private View로 분리
      • TodayAchievementCard: todayAchievement
      • TodayFilterBar: selectedTodoScope, summaryCounts, selectedCategory
      • TodayEmptyContent: todos, completedTodayTodos, hasActiveFilters
      • TodayTodoInspector: todoEditor
    • 각 View에서만 쓰던 progressCount, achievementStatusTitle, emptyStateContent, EmptyStateContent는 해당 View의 멤버로 이동
    • 상태와 무관한 topBar, 화면 이동만 담당하는 destination은 분리하지 않고 유지
    • router.push 클로저가 필요한 TodoSection 반복부는 부모 body에 유지
  • UI 계층, modifier 순서, 탐색 경로와 Store 소유권, 동작은 기존과 동일
  • State, Action, SideEffect, 모듈 의존성, 공개 API 변경 없음

📸 영상 / 이미지 (Optional)

Instruments 측정 (View Body)

  • 조건: Release 최적화(Staging 구성) 빌드, iPhone 18 Pro 시뮬레이터(iOS 27.0), View Body (Legacy), 변경 전후 각 5회 교차 측정 후 중앙값 비교, 괄호는 5회 측정 범위
  • 시나리오: Today 탭에서 남은 일과 중요 칩을 1.5초 간격으로 30회 번갈아 탭
  • 로그인된 계정의 실제 데이터 기준
대상 변경 전 횟수 변경 전 시간 변경 후 횟수 변경 후 시간
TodayView 34회 13.59ms (13.03 ~ 13.91) 33회 7.48ms (6.67 ~ 8.06)
TodayFilterBar - - 2회 0.48ms (0.43 ~ 0.54)
TodayAchievementCard - - 2회 0.38ms (0.36 ~ 0.39)
TodayEmptyContent - - 32회 2.57ms (2.01 ~ 2.66)
TodayTodoInspector - - 1회 0.08ms (0.07 ~ 0.09)
합계 34회 13.59ms (13.03 ~ 13.91) 70회 10.90ms (9.58 ~ 11.68)
  • TodayView body 평가 1회 비용(시간 합계 ÷ 횟수): 약 400µs → 약 227µs
  • 분리한 View가 추가로 평가되어 평가 횟수 합은 늘었으나, 한 번의 평가 비용이 작아 시간 합계는 감소
  • 부모 TodayView가 sections, isLoading, isTodoInspectorPresented를 계속 읽어 부모 body 평가 횟수 자체는 감소하지 않음

@opficdev opficdev self-assigned this Oct 28, 2026
@opficdev
opficdev merged commit d3411b5 into develop Oct 28, 2026
9 checks passed
@opficdev
opficdev deleted the refactor/#881 branch October 28, 2026 08:18
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.

TodayTab의 View 구성 요소와 렌더링 입력을 분리한다

1 participant