Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PERFORMANCE] 리액트 성능 최적화 #219

Merged
merged 10 commits into from
Dec 1, 2021
Merged

Conversation

dailyco
Copy link
Contributor

@dailyco dailyco commented Dec 1, 2021

작업 목록

  • 투표 이벤트 최적화
  • 투표 및 능력 사용 최적화
  • 대기방 입장,퇴장 렌더링 최적화
  • 대기방에서 다른 사용자 ready 시 변경되는 profile card만 렌더링하도록 최적화


설명

  1. 투표 이벤트 최적화
    https://seed-cry-ce7.notion.site/Day-28-Dev-log-fb04fe746aaa45d9ab98cc1c2682166d
  2. 투표 및 능력 사용 최적화
  • 투표 정보를 AbilityButtonList 에서 관리하도록 수정
  • 능력 관련 정보를 AbilityButtonList 에서 관리하도록 수정
    1번 2번 문제를 해결해도 투표 및 능력을 사용할 때마다 AbilityButtonList 전체가 리렌더링 됨 => 추가적인 최적화 필요


Issue traker

donggoolosori and others added 9 commits December 1, 2021 14:12
…컴포넌트 분리

- 다른 사용자 입장, 퇴장 시 불필요한 헤더의 리렌더링 없앰
- 모달 상태 값들 모달 컴포넌트에서 관리
- 메모이제이션 수행
투표와 능력 관련 데이터들을 Game 페이지 하위 컴포넌트들이 관리하도록 수정
- useGame 커스텀 훅에서 players 데이터 삭제 및 관련 데이터 useAbility와 useJobMemo로 이동
- players 데이터 삭제에 맞게 관련 내용들 수정
- Game 페이지에서 players 데이터 삭제
- useAbility 커스텀 훅 하위 컴포넌트 (LeftSideContainer)로 이동
- `useRef` API 사용해서 내가 죽었는지를 나타내는 데이터 생성
- 각 모달과 useAbilityButtonList 로 전달
@dailyco dailyco added the ⚡️ Performance 성능 개선 label Dec 1, 2021
@dailyco dailyco added this to the Sprint 6 milestone Dec 1, 2021
@dailyco dailyco self-assigned this Dec 1, 2021
@dailyco dailyco changed the title [PERFORMANCE] [PERFORMANCE] 리액트 성능 최적화 Dec 1, 2021
@binimini binimini merged commit 0e3db28 into dev Dec 1, 2021
@dailyco dailyco mentioned this pull request Dec 1, 2021
binimini pushed a commit that referenced this pull request Dec 1, 2021
* perf: Waiting page에서 WaitingListContainer와 WaitingBottomBarContainer 컴포넌트 분리

- 다른 사용자 입장, 퇴장 시 불필요한 헤더의 리렌더링 없앰

* perf: ProfileCardContainer 컴포넌트 분리 및 memo로 메모이제이션 수행

* perf: 투표 이벤트 최적화

* perf: 게임 페이지의 모달 분리

- 모달 상태 값들 모달 컴포넌트에서 관리
- 메모이제이션 수행

* perf: 투표 및 능력 사용 최적화 (ing)

투표와 능력 관련 데이터들을 Game 페이지 하위 컴포넌트들이 관리하도록 수정
- useGame 커스텀 훅에서 players 데이터 삭제 및 관련 데이터 useAbility와 useJobMemo로 이동
- players 데이터 삭제에 맞게 관련 내용들 수정

* perf: 투표 및 능력 사용 최적화 (ing)

- Game 페이지에서 players 데이터 삭제
- useAbility 커스텀 훅 하위 컴포넌트 (LeftSideContainer)로 이동

* refactor: 내가 죽었는지를 나타내는 데이터 생성

- `useRef` API 사용해서 내가 죽었는지를 나타내는 데이터 생성
- 각 모달과 useAbilityButtonList 로 전달

Co-authored-by: donggoolosori <[email protected]>
@dailyco dailyco deleted the perf/react-optimization branch December 14, 2021 08:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⚡️ Performance 성능 개선
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants