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

🔨 Refactor: loader 제거 및 데이터 prefetch로 페이지 로딩 시간 최적화 #24

Merged
merged 7 commits into from
Dec 2, 2024

Conversation

a-honey
Copy link
Member

@a-honey a-honey commented Dec 2, 2024

🌌 Linked Out Admin Page Pull Request

✨ Summary

리스트 페이지 loader 제거 후 Nav에서 데이터 prefetch로 변경

🔗 Related Issues

#23 Closes

🔨 Changes

  • usePagination의 loaderData 의존성 제거 후 payload로 totalPage 전달
  • usePagination 사용 예시 변경
  • 중복 요청 방지를 위해 리스트페이지 loader 제거
  • loader 대신 prefetch를 통해 빠른 페이지 렌더링
  • 리스트 페이지 불필요한 로딩 및 에러의 중앙 관리 제거
  • onClick -> onMouseOver 시 데이터 prefetch

loader를 통한 데이터 요청 삭제

  • loader를 통한 데이터 요청으로 인해 중복 요청
    image
  • loader 삭제 후 데이터 1회 요청
    image

prefetch를 통해 230ms -> 73ms -> 17ms

  • prefetch를 통해 NavItem 클릭 시 데이터 요청을 진행(230ms -> 73ms)
    image
  • NavItem onClick -> onMouseOver 시 데이터 요청을 진행(73ms -> 17ms)
    image

💬 Additional Notes

onMouseOver -> 페이지 전환이라는 보장은 없음,,

@a-honey a-honey self-assigned this Dec 2, 2024
@a-honey a-honey added Domain: Admin size: medium 여러 기능이나 모듈에 대한 변화, 여러 파일 수정 labels Dec 2, 2024
@a-honey a-honey merged commit 4d303d1 into main Dec 2, 2024
2 checks passed
@a-honey a-honey deleted the refactor/loader branch December 2, 2024 21:31
@a-honey a-honey added the Priority: Medium 우선순위: 중간 label Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Domain: Admin Priority: Medium 우선순위: 중간 size: medium 여러 기능이나 모듈에 대한 변화, 여러 파일 수정
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant