Skip to content

⚡ Bolt: SessionTimelineChart 성능 최적화#217

Open
seonghobae wants to merge 4 commits into
developmentalfrom
bolt-optimize-session-timeline-chart-6529209220360860021
Open

⚡ Bolt: SessionTimelineChart 성능 최적화#217
seonghobae wants to merge 4 commits into
developmentalfrom
bolt-optimize-session-timeline-chart-6529209220360860021

Conversation

@seonghobae

Copy link
Copy Markdown

💡 What: SessionTimelineChart 컴포넌트 내의 배열 연산과 루프 비용을 절감하기 위해 useMemo를 도입하고 루프 내에서 수행하던 new Date(string).getTime() 파싱을 외부 루프에서 미리 수행하도록 개선했습니다.
🎯 Why: 기존에는 렌더링될 때마다 배열(messages, usageTimeline)의 각 항목을 필터링하고 새로 Date 객체를 생성/파싱하는 동작이 불필요하게 반복되어, 데이터가 많은 경우 성능 저하와 불필요한 렌더링이 유발되는 문제가 있었습니다.
📊 Impact: 리렌더링마다 수행되던 $O(N \times M)$ 번의 Date 파싱 연산이 초기화 시점에 한 번만 $O(M)$ 수행되도록 개선되어 렌더링 속도와 메인 스레드 부하가 감소합니다.
🔬 Measurement: 수십 건 이상의 메시지와 툴 호출이 포함된 큰 Session Detail 페이지를 로드할 때 프로파일러 상에서 getToolSummaryForIndex의 실행 시간이 크게 줄어든 것을 확인할 수 있습니다.


PR created automatically by Jules for task 6529209220360860021 started by @seonghobae

- chartData 및 toolCalls 배열에 `useMemo` 적용
- 반복문 내 `new Date().getTime()` 호출 비용 절감을 위해 `parsedTimestamp` 사전 캐싱 적용
- early return 조건문을 Hooks 선언부 아래로 이동하여 React Hooks 규칙 준수
@google-labs-jules

Copy link
Copy Markdown

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

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.

1 participant