Skip to content

⚡ Bolt: 가상 리스트 렌더링 성능 최적화 (날짜 파싱 오버헤드 제거)#274

Open
seonghobae wants to merge 1 commit into
developmentalfrom
bolt/optimize-event-list-date-parsing-4829133417130071756
Open

⚡ Bolt: 가상 리스트 렌더링 성능 최적화 (날짜 파싱 오버헤드 제거)#274
seonghobae wants to merge 1 commit into
developmentalfrom
bolt/optimize-event-list-date-parsing-4829133417130071756

Conversation

@seonghobae

Copy link
Copy Markdown

💡 What

  • EventList 컴포넌트 내의 formatElapsed 함수에서 매 렌더링마다 수행하던 new Date(sessionStartedAt).getTime() 연산을 부모 컴포넌트 레벨로 끌어올려 한 번만 계산하도록 수정했습니다.

🎯 Why

  • react-window를 사용한 가상 리스트는 스크롤 시 렌더링을 자주 발생시킵니다. 렌더 함수 내부에서 문자열 날짜를 Date 객체로 파싱하는 것은 비용이 높은 작업이며 불필요한 연산 오버헤드를 유발합니다. 이 값을 미리 계산(ms 단위)해 전달하면 이러한 병목을 방지할 수 있습니다.

📊 Impact

  • 리스트 스크롤 시 발생하던 불필요한 날짜 객체 생성 및 파싱 오버헤드 감소. O(V)의 반복 연산에서 O(1)로 개선(V는 보이는 행 수).

🔬 Measurement

  • 가상 리스트 스크롤 시 프레임 드랍이 줄어들고 더 부드럽게 스크롤되는지 육안으로 확인 가능합니다. 프로파일러를 통한 렌더 함수 호출 당 처리 시간 단축 확인 가능.

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

@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