Skip to content

⚡ Bolt: [성능 개선] _choose_silence_split_point의 탐색을 O(N)에서 O(log N)으로 최적화#261

Open
seonghobae wants to merge 1 commit into
mainfrom
bolt-optimize-split-search-4712262738130563514
Open

⚡ Bolt: [성능 개선] _choose_silence_split_point의 탐색을 O(N)에서 O(log N)으로 최적화#261
seonghobae wants to merge 1 commit into
mainfrom
bolt-optimize-split-search-4712262738130563514

Conversation

@seonghobae

Copy link
Copy Markdown
Contributor

💡 What: _choose_silence_split_point에서 후보 분할 지점을 탐색할 때 리스트를 전체 순회하는 대신 bisect를 사용하여 O(log N)으로 탐색을 최적화했습니다.
🎯 Why: silence_intervals가 긴 영상/오디오 파일일 경우 수만 개가 될 수 있으며, 매 세그먼트 생성 시 이를 전체 순회(O(N))하는 것은 성능 저하의 원인이 됩니다. 배열이 이미 정렬되어 있으므로 이진 탐색을 사용할 수 있습니다.
📊 Impact: 후보군 탐색 시간이 O(N)에서 O(log N)으로 크게 줄어들며 벤치마크 상 큰 속도 향상이 있습니다.
🔬 Measurement: 10만개의 무음 구간에 대해 탐색할 때 O(N)에서 2.2초 소요되던 작업이 O(log N) 최적화 시 0.0004초로 크게 향상됩니다.


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

`_choose_silence_split_point`에서 후보 분할 지점을 탐색할 때 리스트를 전체 순회하는 대신 `bisect`를 사용하여 O(log N)으로 탐색을 최적화했습니다.

`silence_intervals`가 긴 영상/오디오 파일일 경우 수만 개가 될 수 있으며, 매 세그먼트 생성 시 이를 전체 순회(O(N))하는 것은 성능 저하의 원인이 됩니다. 배열이 이미 정렬되어 있으므로 이진 탐색을 사용할 수 있습니다.

후보군 탐색 시간이 O(N)에서 O(log N)으로 크게 줄어들며 벤치마크 상 큰 속도 향상이 있습니다. (10만개의 무음 구간에 대해 탐색할 때 O(N)에서 2.2초 소요되던 작업이 O(log N) 최적화 시 0.0004초로 향상)
@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