Skip to content

⚡ Bolt: [성능 개선] SessionTimelineChart 컴포넌트 날짜 파싱 최적화 - #419

Closed
seonghobae wants to merge 1 commit into
developmentalfrom
bolt-optimize-date-parse-1217703062005825421
Closed

⚡ Bolt: [성능 개선] SessionTimelineChart 컴포넌트 날짜 파싱 최적화#419
seonghobae wants to merge 1 commit into
developmentalfrom
bolt-optimize-date-parse-1217703062005825421

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 10, 2026

Copy link
Copy Markdown

💡 What: SessionTimelineChart 컴포넌트에서 Array.prototype.sort() 실행 시 반복적으로 발생하는 불필요한 new Date() 객체 할당을 Date.parse() 및 선행 변환(O(N))을 통해 개선했습니다.
🎯 Why: 정렬 비교 함수 내부에서 new Date(a.timestamp).getTime()을 호출하면 O(N log N) 횟수의 무거운 날짜 객체 생성 및 파싱이 발생하며, 이는 메모리 할당 증가와 가비지 컬렉션(GC) 오버헤드를 초래하여 차트 렌더링 성능 저하의 주된 원인이 됩니다.
📊 Impact: new Date().getTime() 대비 Date.parse() 사용을 통해 메모리 할당 비용을 절감하였고, O(N log N) 파싱 횟수를 O(N)으로 대폭 줄여 대량의 타임라인 데이터 처리 시 성능 향상을 제공합니다.
🔬 Measurement: packages/web/src/components/dashboard/session-timeline-chart.test.tsx의 단위 테스트를 통해 기능의 정확성을 확인하고 로컬 테스트 성능 개선을 검증하였습니다.


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

Summary by CodeRabbit

  • 버그 수정
    • 세션 타임라인 차트의 타임스탬프 처리를 개선해 이벤트가 시간순으로 더 정확하게 표시되도록 했습니다.
    • 메시지 기반 도구 이벤트의 시간 변환 안정성을 높였습니다.

@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.

@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 926bc224-b6e9-4c95-84ae-dca5d0f57553

📥 Commits

Reviewing files that changed from the base of the PR and between a5be9b0 and 44731a9.

📒 Files selected for processing (1)
  • packages/web/src/components/dashboard/session-timeline-chart.tsx

📝 Walkthrough

Walkthrough

buildChartData가 사용량 타임스탬프를 정렬 전에 한 번 파싱하고 결과를 재사용합니다. 도구 메시지의 타임스탬프 변환도 Date.parse()를 사용하도록 변경되었습니다.

Changes

타임스탬프 파싱 최적화

Layer / File(s) Summary
차트 타임스탬프 처리
packages/web/src/components/dashboard/session-timeline-chart.tsx
사용량 타임스탬프를 사전 파싱하고, 정렬과 현재 시각 계산에 파싱 결과를 재사용합니다. 도구 메시지의 타임스탬프 변환도 Date.parse()로 변경되었습니다.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목은 SessionTimelineChart의 날짜 파싱 성능 개선이라는 주요 변경 사항을 명확하고 간결하게 설명합니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch bolt-optimize-date-parse-1217703062005825421

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

OpenCode cannot approve yet because required coverage evidence did not pass.

Review outcome

1. HIGH .github/workflows/opencode-review.yml:1 - Coverage evidence did not prove required test/docstring evidence

  • Problem: The required coverage-evidence job result was failure, so OpenCode cannot establish approval sufficiency for this head.

  • Root cause: Automated approval is only valid when the same-head coverage-evidence job proves supported repository test suites passed and configured docstring gates passed or were advisory, or reports not applicable because no supported source files or package manifests exist. Missing, failed, skipped, unavailable, or unsupported-tooling test evidence is a blocker.

  • Fix: Install or configure the repository test/docstring evidence tooling when source files or package manifests exist, rerun the current-head coverage-evidence job, and approve only after it reports success with required evidence or explicit no-source not-applicable evidence.

  • Regression test: Keep the approval branch checking needs.coverage-evidence.result == success before posting APPROVE, and publish REQUEST_CHANGES when coverage-evidence blocker states such as cancelled, skipped, failed, unsupported-tooling, or below-100 evidence are present.

  • Result: REQUEST_CHANGES

  • Reason: coverage-evidence result was failure, so required test/docstring evidence was not proven for current head 44731a902c79dc89e66ca2ecd716a560aaa2186d.

  • Head SHA: 44731a902c79dc89e66ca2ecd716a560aaa2186d

  • Workflow run: 31381253185

  • Workflow attempt: 1

Coverage evidence

Coverage evidence job did not run or did not publish coverage evidence.

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Changed file: session-timeline-chart.tsx"]
  S1 --> I1["repository behavior"]
  I1 --> R1["Review risk: Changed file: session-timeline-chart.tsx"]
  R1 --> V1["required checks"]
Loading

@opencode-agent

Copy link
Copy Markdown

OpenCode Review Overview

  • Head SHA: 44731a902c79dc89e66ca2ecd716a560aaa2186d
  • Workflow run: 31381253185
  • Workflow attempt: 1
  • Gate result: REQUEST_CHANGES (approval step)

Pull request overview

OpenCode cannot approve yet because required coverage evidence did not pass.

Review outcome

1. HIGH .github/workflows/opencode-review.yml:1 - Coverage evidence did not prove required test/docstring evidence

  • Problem: The required coverage-evidence job result was failure, so OpenCode cannot establish approval sufficiency for this head.

  • Root cause: Automated approval is only valid when the same-head coverage-evidence job proves supported repository test suites passed and configured docstring gates passed or were advisory, or reports not applicable because no supported source files or package manifests exist. Missing, failed, skipped, unavailable, or unsupported-tooling test evidence is a blocker.

  • Fix: Install or configure the repository test/docstring evidence tooling when source files or package manifests exist, rerun the current-head coverage-evidence job, and approve only after it reports success with required evidence or explicit no-source not-applicable evidence.

  • Regression test: Keep the approval branch checking needs.coverage-evidence.result == success before posting APPROVE, and publish REQUEST_CHANGES when coverage-evidence blocker states such as cancelled, skipped, failed, unsupported-tooling, or below-100 evidence are present.

  • Result: REQUEST_CHANGES

  • Reason: coverage-evidence result was failure, so required test/docstring evidence was not proven for current head 44731a902c79dc89e66ca2ecd716a560aaa2186d.

  • Head SHA: 44731a902c79dc89e66ca2ecd716a560aaa2186d

  • Workflow run: 31381253185

  • Workflow attempt: 1

Coverage evidence

Coverage evidence job did not run or did not publish coverage evidence.

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Changed file: session-timeline-chart.tsx"]
  S1 --> I1["repository behavior"]
  I1 --> R1["Review risk: Changed file: session-timeline-chart.tsx"]
  R1 --> V1["required checks"]
Loading

Copy link
Copy Markdown
Author

Superseded by #425. Fresh comparison confirms this head (44731a902c79dc89e66ca2ecd716a560aaa2186d) changes only session-timeline-chart.tsx on older protected-base snapshot a5be9b0af2a8ed615ebdbc5519e75b8e569f2529. Current-base successor #425 at e8ac76804a08cdebe22a50d8a0ee5063312d02db preserves the same O(N) parse-once usage mapping and tool-message Date.parse change, then adds the millisecond-relative-time path plus a regression that proves the exact parse-call budget. Closing this strict subset to keep one canonical implementation and preserve lineage here; #425 still retains its own current-head review/policy gates.

@seonghobae seonghobae closed this Aug 11, 2026
@google-labs-jules

Copy link
Copy Markdown

Superseded by #425. Fresh comparison confirms this head (44731a902c79dc89e66ca2ecd716a560aaa2186d) changes only session-timeline-chart.tsx on older protected-base snapshot a5be9b0af2a8ed615ebdbc5519e75b8e569f2529. Current-base successor #425 at e8ac76804a08cdebe22a50d8a0ee5063312d02db preserves the same O(N) parse-once usage mapping and tool-message Date.parse change, then adds the millisecond-relative-time path plus a regression that proves the exact parse-call budget. Closing this strict subset to keep one canonical implementation and preserve lineage here; #425 still retains its own current-head review/policy gates.

Understood. Acknowledging that this PR has been superseded and I will stop work on 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