-
Notifications
You must be signed in to change notification settings - Fork 0
[FE] - 차트교체 및 무한스크롤을 통한 패칭 구현 #34
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.

📝 요약(Summary)
캔들스틱 차트 변경 (Amcharts5 => lightweight-charts
로컬에서 빌드파일 실행시에는
lighthouse지표가90점이상 높게 나왔지만 배포를lighthouse를 돌렸을 때는 점수가50~60점 사이로 낮게 나왔습니다.이유는 배포환경에서는 백엔드가 계속 켜져있어서 차트 데이터가 DB에 많이 축적이 되었고, 프론트엔드 차트에서는 DB에 쌓인 차트데이터를 한번에 렌더링 하려다 보니 렌더링시 차트때문에 긴 시간동안 blocking되었습니다.
시도: Amcharts5에 페이지네이션 적용
이를 해결하기 위해 한번에 모두 불러오던 과거 시계열 데이터를 페이지네이션을 적용하는 시도를 했습니다.
다만 Amcharts5에 페이지네이션을 적용했을 때 기대되는 동작은 사용자의 스크롤 이벤트를 감지해서 데이터를 다음 시계열 데이터를 패칭하고
sliding window처럼 보여주는 것을 기대했습니다.하지만 Amcharts5에 페이지네이션을 적용했을때
sliding window처럼 보여지는 것이 아닌, 사용자의 스크롤에 따라 과거 데이터를 순차적으로 패칭해서 보여주되, 기존에 존재하던 시계열 데이터도 보여주게 되있어서 사용자가 왼쪽으로 스크롤 할수록 차트는 줌 아웃이 되어서 캔들이 작게 보여지는 현상이 일어났습니다.이는 Amcharts5의 기본동작으로 이를 override하려고 했지만 되지가 않아서 캔들차트에 사용되는 차트를 교체하기로 했습니다.
결론:
lightweight-charts로 교체결론적으로
lightweight-charts로 교체하였고 아래의 기능을 추가했습니다.1분봉,3분봉등추가적으로
lightweight-charts를선언형 컴포넌트로 사용할 수 있도록 래핑하는 작업을 하였습니다.Sentry설정 추가운영환경에서의 에러로깅과 성능측정을 위해
Sentry설정을 추가했습니다.사이드바 닫히도록 변경
사이드바에서 코인 아이템 링크를 클릭시 사이드바가 닫히도록 변경했습니다.
🛠️ PR 유형
어떤 변경 사항이 있나요?
💬 공유사항 to 리뷰어
ex) 메서드 XXX의 이름을 더 잘 짓고 싶은데 혹시 좋은 명칭이 있을까요?
📸스크린샷 (선택)
✅ PR Checklist
PR이 다음 요구 사항을 충족하는지 확인하세요.
Closes #33