Skip to content

⚡ Bolt: [성능 개선] 핫 루프 내 불필요한 문자열 할당 지연 - #721

Open
seonghobae wants to merge 1 commit into
masterfrom
bolt/optimize-lowercase-allocation-16965450349508392092
Open

seonghobae wants to merge 1 commit into
masterfrom
bolt/optimize-lowercase-allocation-16965450349508392092

Conversation

@seonghobae

@seonghobae seonghobae commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator

💡 내용: toLowerCase() 문자열 할당을 비용이 적게 드는 조건문(isHiddenFile(), endsWith("~")) 이후로 지연시켰습니다.
🎯 이유: 디렉토리 순회 핫 루프에서 모든 파일에 대해 새로운 문자열을 할당하면 가비지 컬렉션(GC) 압력이 증가하고 성능이 저하되기 때문입니다.
📊 영향: 숨김 파일 및 임시 파일에 대해 불필요한 문자열 할당이 발생하지 않아 메모리 사용량과 GC 부하가 감소합니다.
🔬 측정: 파일 수가 많은 디렉토리에서 크롤링 속도 및 메모리 프로파일링을 통해 개선 사항을 확인할 수 있습니다.


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

Summary by CodeRabbit

  • 성능 개선

    • 파일 무시 처리 시 저비용 조건을 먼저 확인하고, 필요한 경우에만 문자열 변환을 수행하도록 최적화했습니다.
    • 기존과 동일한 파일 제외 결과를 유지하면서 처리 효율을 높였습니다.
  • 문서

    • 반복 처리 구간에서 불필요한 문자열 할당을 지연하는 최적화 지침을 추가했습니다.

- isHiddenFile 및 endsWith("~") 검사 후 toLowerCase 호출
@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 Sep 17, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: eb7e7861-13f7-46e5-bbe4-9d1036c63ba9

📥 Commits

Reviewing files that changed from the base of the PR and between 728f0f3 and 9bc3568.

📒 Files selected for processing (2)
  • .jules/bolt.md
  • src/main/kotlin/html4tree/main.kt

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

민감 파일 제외 검사는 저비용 조건을 먼저 평가합니다. 조건이 모두 실패한 경우에만 toLowerCase(Locale.ROOT)와 민감 이름 및 확장자 매칭을 수행합니다. 관련 최적화 지침을 학습 노트에 추가했습니다.

Changes

민감 파일 검사 최적화

Layer / File(s) Summary
문자열 변환 지연 및 검증 지침
src/main/kotlin/html4tree/main.kt, .jules/bolt.md
isHiddenFile()endsWith("~")를 먼저 검사합니다. 두 조건이 실패한 경우에만 toLowerCase(Locale.ROOT)와 민감 파일 매칭을 실행합니다. 같은 최적화 원칙을 학습 노트에 기록했습니다.

Priority: ⬇️ Low

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

Change: Refactor

Merge Risk: ⚪ Minimal · up to 9bc35

This is a localized performance optimization that preserves the existing exclusion behavior, so it is mergeable.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. (1 skipped: 1 … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목은 핫 루프에서 불필요한 문자열 할당을 지연하는 성능 개선을 정확하고 간결하게 설명합니다. 이는 PR의 주요 변경 사항과 일치합니다.
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.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 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-lowercase-allocation-16965450349508392092

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.

@seonghobae seonghobae added enhancement New feature or request priority: medium Normal-priority or P2 work labels Sep 19, 2026 — with ChatGPT Codex Connector
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request priority: medium Normal-priority or P2 work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant