Skip to content

⚡ Bolt: String.urlEncodePath 성능 최적화#126

Open
seonghobae wants to merge 1 commit into
masterfrom
bolt-url-encode-path-optimization-14014846559064767824
Open

⚡ Bolt: String.urlEncodePath 성능 최적화#126
seonghobae wants to merge 1 commit into
masterfrom
bolt-url-encode-path-optimization-14014846559064767824

Conversation

@seonghobae

Copy link
Copy Markdown
Collaborator

💡 What: String.urlEncodePath 함수 내의 반복문에서 발생하는 불필요한 String 할당을 제거하고 StringBuilder 초기 크기를 고정 할당하였습니다.
🎯 Why: URL 인코딩 과정에서 매 바이트마다 호출되던 toString(16).padStart가 중간 String 객체를 대량으로 생성하여 성능 저하의 원인이 되고 있었습니다.
📊 Impact: 10만 회 루프 기준 실행 시간이 약 435ms에서 196ms로 감소하여 55% 이상의 성능 개선을 이뤘습니다.
🔬 Measurement: 추가되었던 벤치마크 스크립트로 성능 향상을 확인했으며 기존 테스트 코드를 100% 통과합니다.


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

- `StringBuilder`에 적절한 크기를 초기 할당하여 리사이징(resizing) 비용을 줄였습니다.
- 비트 연산(`ushr`, `and`)과 hex 문자열(`hexChars`)을 사용해 매번 `byte.toString(16).padStart` 호출 시 발생하던 임시 객체 생성을 제거했습니다.
- 성능 벤치마크 결과 10만 회 실행 기준 약 55%의 성능 향상이 확인되었습니다.
@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