Skip to content

⚡ Bolt: [성능 개선] 중복되는 buildTimelineGroups 연산을 상위 컴포넌트로 올려 캐싱#100

Merged
seonghobae merged 1 commit into
developmentalfrom
bolt-perf-build-timeline-groups-memo-10280015208843955185
Jun 23, 2026
Merged

⚡ Bolt: [성능 개선] 중복되는 buildTimelineGroups 연산을 상위 컴포넌트로 올려 캐싱#100
seonghobae merged 1 commit into
developmentalfrom
bolt-perf-build-timeline-groups-memo-10280015208843955185

Conversation

@seonghobae

Copy link
Copy Markdown

💡 What:
page.tsx (the parent component) now pre-computes groups using useMemo(() => buildTimelineGroups(events), [events]) and passes the result as a prop to its child components (EventList and SessionActivityRibbon).

🎯 Why:
Both EventList and SessionActivityRibbon were calling buildTimelineGroups(events) inside their own useMemo hooks. Since events can contain many elements, iterating over the array redundantly in two different child components results in unnecessary CPU cycles when events changes.

📊 Impact:
Reduces redundant O(n) array reduction passes from 2 down to 1 when computing timeline groups from raw events.

🔬 Measurement:
No broken tests; visual regression avoids extra rendering passes. Code runs correctly.


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

…licate calculation

`buildTimelineGroups` was calculated redundantly inside both `EventList` and `SessionActivityRibbon` inside `useMemo` hooks. This commit moves the `useMemo` computation into the parent `page.tsx` component and passes down `groups` as a prop to its children, preventing duplicate O(n) array iterations per `events` change.
@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.

@seonghobae seonghobae merged commit 339134f into developmental Jun 23, 2026
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