Skip to content

perf(ignore): evaluate array-backed sensitive-extension scan - #767

Draft
seonghobae wants to merge 10 commits into
masterfrom
bolt-optimize-any-9023160704607652878
Draft

seonghobae wants to merge 10 commits into
masterfrom
bolt-optimize-any-9023160704607652878

Conversation

@seonghobae

@seonghobae seonghobae commented Sep 22, 2026 •

Copy link
Copy Markdown
Collaborator

process_ignore_file의 고정 민감 확장자 집합을 List에서 Array로 바꾸는 성능 후보입니다.

Kotlin/JVM 구현상 Iterable.any와 Array.any의 순회 방식이 다를 수 있다는 점은 최적화 가설의 근거일 뿐, 실제 html4tree workload의 buyer-visible 성능 개선 증거는 아닙니다. 기존 PR 본문의 GC/속도 향상 표현은 대표 workload 측정 전에는 확정하지 않습니다.

소급 .jules/bolt.md 기록은 protected master와 동일하게 복구했습니다. 현재 source delta는 collection representation 변경에 집중합니다.

#758도 같은 병목을 겨냥한 sibling 후보이며, 그쪽은 별도 array를 추가하고 기존 List alias를 남기는 구현입니다. 두 PR 중 하나를 단순히 중복이라는 이유로 닫지 않습니다. protected base와 두 후보를 같은 조건에서 비교해 semantics/evidence를 완전히 승계한 쪽이 확인된 뒤에만 predecessor 종료를 판단합니다.

Promotion acceptance:

  • 민감 확장자 집합·대소문자 정규화·ignore 결과가 protected base와 byte-for-byte/behaviorally 동일할 것
  • 실제 또는 right-cleared 대규모 디렉터리 corpus에서 같은 JVM/host/runtime으로 wall time, CPU, allocation/op, GC count/time의 median·p95를 base/perf(ignore): compare array scan while preserving list contract #758/perf(ignore): evaluate array-backed sensitive-extension scan #767 사이에서 비교할 것
  • warm-up/sample 축소나 측정 제외로 차이를 만들지 않을 것
  • 차이가 noise floor이면 성능 개선으로 채택하지 않을 것
  • current exact head의 CI/security/static-analysis gate가 terminal GREEN일 것

측정 전에는 Draft를 유지하고 자동 merge하지 않습니다.

💡 What: `Constants.defaultSensitiveExtensions`를 `List`에서 `Array`로 변경했습니다.
🎯 Why: 디렉토리 탐색 중 각 파일마다 `.any {}`를 호출할 때, `List`는 매번 `Iterator` 객체를 할당하지만, `Array`를 사용하면 인라인 처리되어 일반 for 루프를 사용하므로 불필요한 객체 생성을 방지할 수 있습니다.
📊 Impact: 많은 수의 파일을 탐색할 때 가비지 컬렉터(GC) 오버헤드를 줄이고 이론적인 탐색 속도를 향상시킵니다.
🔬 Measurement: 코드 컴파일 시 `Array.any`가 `Iterator` 할당 없이 인라인으로 전개되는 것을 통해 최적화가 적용됨을 알 수 있습니다.
@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 22, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

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: c3f64efe-6679-459b-b15a-42111a3f08e5

📥 Commits

Reviewing files that changed from the base of the PR and between 728f0f3 and 0e8f6c0.

📒 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

defaultSensitiveExtensions의 타입이 List<String>에서 Array<String>로 변경되었습니다. 확장자 값과 검사 조건은 유지됩니다. 관련 학습 노트가 추가되었습니다.

Changes

민감 확장자 컬렉션

Layer / File(s) Summary
민감 확장자 배열 사용
src/main/kotlin/html4tree/main.kt, .jules/bolt.md
defaultSensitiveExtensions가 arrayOf(...)로 선언됩니다. process_ignore_file은 배열에 any를 적용합니다. 학습 노트는 빈번한 List 순회에서 발생하는 Iterator 할당과 정적 컬렉션에 Array를 사용하는 내용을 기록합니다.

Priority: ⬇️ Low

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

Change: Refactor

Merge Risk: ⚪ Minimal · up to 0e8f6

The scan’s behavior is unchanged, and the type change does not affect a supported external API. No actionable merge risk remains.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목은 defaultSensitiveExtensions를 배열 기반으로 변경하여 민감한 확장자 검색 성능을 개선하는 주요 변경 사항을 정확하고 간결하게 설명합니다.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

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.

💡 What: `Constants.defaultSensitiveExtensions`를 `List`에서 `Array`로 변경했습니다.
🎯 Why: 디렉토리 탐색 중 각 파일마다 `.any {}`를 호출할 때, `List`는 매번 `Iterator` 객체를 할당하지만, `Array`를 사용하면 인라인 처리되어 일반 for 루프를 사용하므로 불필요한 객체 생성을 방지할 수 있습니다.
📊 Impact: 많은 수의 파일을 탐색할 때 가비지 컬렉터(GC) 오버헤드를 줄이고 이론적인 탐색 속도를 향상시킵니다.
🔬 Measurement: 코드 컴파일 시 `Array.any`가 `Iterator` 할당 없이 인라인으로 전개되는 것을 통해 최적화가 적용됨을 알 수 있습니다.
💡 What: `Constants.defaultSensitiveExtensions`를 `List`에서 `Array`로 변경했습니다.
🎯 Why: 디렉토리 탐색 중 각 파일마다 `.any {}`를 호출할 때, `List`는 매번 `Iterator` 객체를 할당하지만, `Array`를 사용하면 인라인 처리되어 일반 for 루프를 사용하므로 불필요한 객체 생성을 방지할 수 있습니다.
📊 Impact: 많은 수의 파일을 탐색할 때 가비지 컬렉터(GC) 오버헤드를 줄이고 이론적인 탐색 속도를 향상시킵니다.
🔬 Measurement: 코드 컴파일 시 `Array.any`가 `Iterator` 할당 없이 인라인으로 전개되는 것을 통해 최적화가 적용됨을 알 수 있습니다.
@seonghobae
seonghobae marked this pull request as draft September 23, 2026 07:12
@seonghobae seonghobae changed the title ⚡ Bolt: defaultSensitiveExtensions 컬렉션 타입을 Array로 변경하여 Iterator 할당 방지 perf(ignore): evaluate array-backed sensitive-extension scan Sep 23, 2026
💡 What: `Constants.defaultSensitiveExtensions`를 `List`에서 `Array`로 변경했습니다.
🎯 Why: 디렉토리 탐색 중 각 파일마다 `.any {}`를 호출할 때, `List`는 매번 `Iterator` 객체를 할당하지만, `Array`를 사용하면 인라인 처리되어 일반 for 루프를 사용하므로 불필요한 객체 생성을 방지할 수 있습니다.
📊 Impact: 많은 수의 파일을 탐색할 때 가비지 컬렉터(GC) 오버헤드를 줄이고 이론적인 탐색 속도를 향상시킵니다.
🔬 Measurement: 코드 컴파일 시 `Array.any`가 `Iterator` 할당 없이 인라인으로 전개되는 것을 통해 최적화가 적용됨을 알 수 있습니다.
💡 What: `Constants.defaultSensitiveExtensions`를 `List`에서 `Array`로 변경했습니다.
🎯 Why: 디렉토리 탐색 중 각 파일마다 `.any {}`를 호출할 때, `List`는 매번 `Iterator` 객체를 할당하지만, `Array`를 사용하면 인라인 처리되어 일반 for 루프를 사용하므로 불필요한 객체 생성을 방지할 수 있습니다.
📊 Impact: 많은 수의 파일을 탐색할 때 가비지 컬렉터(GC) 오버헤드를 줄이고 이론적인 탐색 속도를 향상시킵니다.
🔬 Measurement: 코드 컴파일 시 `Array.any`가 `Iterator` 할당 없이 인라인으로 전개되는 것을 통해 최적화가 적용됨을 알 수 있습니다.
💡 What: `Constants.defaultSensitiveExtensions`를 `List`에서 `Array`로 변경했습니다.
🎯 Why: 디렉토리 탐색 중 각 파일마다 `.any {}`를 호출할 때, `List`는 매번 `Iterator` 객체를 할당하지만, `Array`를 사용하면 인라인 처리되어 일반 for 루프를 사용하므로 불필요한 객체 생성을 방지할 수 있습니다.
📊 Impact: 많은 수의 파일을 탐색할 때 가비지 컬렉터(GC) 오버헤드를 줄이고 이론적인 탐색 속도를 향상시킵니다.
🔬 Measurement: 코드 컴파일 시 `Array.any`가 `Iterator` 할당 없이 인라인으로 전개되는 것을 통해 최적화가 적용됨을 알 수 있습니다.
💡 What: `Constants.defaultSensitiveExtensions`를 `List`에서 `Array`로 변경했습니다.
🎯 Why: 디렉토리 탐색 중 각 파일마다 `.any {}`를 호출할 때, `List`는 매번 `Iterator` 객체를 할당하지만, `Array`를 사용하면 인라인 처리되어 일반 for 루프를 사용하므로 불필요한 객체 생성을 방지할 수 있습니다.
📊 Impact: 많은 수의 파일을 탐색할 때 가비지 컬렉터(GC) 오버헤드를 줄이고 이론적인 탐색 속도를 향상시킵니다.
🔬 Measurement: 코드 컴파일 시 `Array.any`가 `Iterator` 할당 없이 인라인으로 전개되는 것을 통해 최적화가 적용됨을 알 수 있습니다.
💡 What: `Constants.defaultSensitiveExtensions`를 `List`에서 `Array`로 변경했습니다.
🎯 Why: 디렉토리 탐색 중 각 파일마다 `.any {}`를 호출할 때, `List`는 매번 `Iterator` 객체를 할당하지만, `Array`를 사용하면 인라인 처리되어 일반 for 루프를 사용하므로 불필요한 객체 생성을 방지할 수 있습니다.
📊 Impact: 많은 수의 파일을 탐색할 때 가비지 컬렉터(GC) 오버헤드를 줄이고 이론적인 탐색 속도를 향상시킵니다.
🔬 Measurement: 코드 컴파일 시 `Array.any`가 `Iterator` 할당 없이 인라인으로 전개되는 것을 통해 최적화가 적용됨을 알 수 있습니다.
💡 What: `Constants.defaultSensitiveExtensions`를 `List`에서 `Array`로 변경했습니다.
🎯 Why: 디렉토리 탐색 중 각 파일마다 `.any {}`를 호출할 때, `List`는 매번 `Iterator` 객체를 할당하지만, `Array`를 사용하면 인라인 처리되어 일반 for 루프를 사용하므로 불필요한 객체 생성을 방지할 수 있습니다.
📊 Impact: 많은 수의 파일을 탐색할 때 가비지 컬렉터(GC) 오버헤드를 줄이고 이론적인 탐색 속도를 향상시킵니다.
🔬 Measurement: 코드 컴파일 시 `Array.any`가 `Iterator` 할당 없이 인라인으로 전개되는 것을 통해 최적화가 적용됨을 알 수 있습니다.
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