Skip to content

PushNotificationListView를 CollectionUI로 전환하고 성능을 측정한다 #816

Description

@opficdev

배경

PushNotificationListView는 페이지네이션 목록에 새로고침, 정렬·기간·읽음 filter, Firestore 실시간 관찰, 읽음·삭제 action과 compact/non-compact 선택 동작을 함께 제공함.

기존 feature와 Firestore 계약을 유지하면서 #814의 공용 CollectionUI를 적용하고, 대량 scroll과 새 알림 반영 시 List 대비 성능을 측정할 필요가 있음.

선행 이슈

작업 범위

  • NotificationTab target에 Libraries/CollectionUI 직접 의존성 추가
  • notificationListContentListCollectionUI 기반 collection으로 전환
  • UICollectionViewDiffableDataSource 사용
  • UICollectionViewCompositionalLayout 사용
  • item identifier는 전체 모델이 아닌 안정적인 notification.id 사용
  • feature가 소유하는 순수 UIKit notification cell과 UICollectionView.CellRegistration 구현
  • section별 layout provider로 plain list section과 filter header 구성
  • filter header의 가로 scroll, safe-area 배치, iOS 17~26 동작 보존
  • 다음 페이지는 snapshot item append로 반영
  • 새 snapshot, 읽음 상태, 선택 상태와 상대 시간 변경은 변경된 ID만 삽입 또는 reconfigureItems(_:) 처리
  • 삭제는 snapshot에서 해당 ID만 제거
  • UICollectionViewDataSourcePrefetching으로 다음 페이지 요청
  • nextCursor != nilisLoading 조건을 유지하고 중복 loadNextPage 요청 방지
  • 여러 행의 상대 시간 갱신을 하나의 화면 단위 scheduler로 통합하되 기존 표시 결과 보존
  • cell은 화면 표현에 필요한 값과 callback만 수신하고 Store·Coordinator를 보관하지 않도록 구성
  • #812의 렌더링 입력 축소 원칙 준수

기존 동작 보존

  • refresh 완료 후 startObserving 재개 순서
  • replaceNotifications, appendNotifications, nextCursor 상태 계약
  • Firestore listener 범위와 Repository/UseCase 계약
  • 정렬, 기간, 읽지 않음 filter와 filter 초기화
  • 좌측 swipe의 읽음 전환
  • 우측 swipe의 삭제와 ToastPresenter 삭제 취소
  • compact의 sheet와 non-compact의 선택·상세 표시
  • loading overlay, 빈 상태, alert
  • 사용자에게 보이는 상대 시간 갱신 결과

성능 측정

#814의 공통 절차에 따라 기존 List와 적용 후 collection을 비교함.

  • 데이터 건수: 20, 100, 500, 1,000
  • 시나리오
    • 최초 표시
    • 60초 연속 scroll
    • 다음 페이지 append
    • 동일 간격의 새 알림 10건 반영
    • 읽음 전환과 삭제
  • 기록
    • CPU
    • 최대·안정 상태 memory
    • hitch 수와 누적 시간
    • 새 알림 수신부터 화면 반영까지의 시간
    • page append와 reconfigureItems(_:) 반영 시간
    • 기기, OS, build configuration, 반복 횟수
  • 각 시나리오 5회 반복 후 중앙값과 최대값을 이슈 댓글 또는 PR 본문에 표로 기록
  • 개선·동일·악화 판정과 UIKit 구현 유지 여부 기록

완료 조건

  • 알림 목록에서 SwiftUI List가 제거됨
  • UICollectionViewDiffableDataSourceUICollectionViewCompositionalLayout이 모두 적용됨
  • 페이지네이션, 실시간 관찰, filter, swipe, refresh, compact/non-compact 동작이 기존과 동일함
  • Firestore·Repository·UseCase 계약 변경 없이 Presentation rendering만 전환됨
  • 순수 UIKit cell이 Store·Coordinator 없이 좁은 입력으로 구성됨
  • 관련 feature/unit test와 회귀 test가 통과함
  • changed-file SwiftLint, Tuist 생성, build-only 검증이 통과함
  • 동일 조건의 전후 성능 수치와 결론이 기록됨

제외 범위

  • Firestore query, listener 범위, billing 정책 변경
  • PushNotificationListFeature의 pagination·refresh 계약 변경
  • Todo 상세 기능 변경
  • 다른 화면의 List 전환

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions