⚡ Bolt: [성능 최적화] 정규표현식 사전 컴파일 적용 및 테스트 커버리지 향상 - #52
Conversation
- `process_ignore_file` 내 파일 검사 시 매번 정규식을 컴파일하던 병목 해결 - 불필요한 조건문 및 중복 로직 제거로 분기 커버리지 향상 - JaCoCo 설정 및 단위 테스트 추가로 라인/분기 커버리지 100% 달성
|
👋 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 New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
Understood. Acknowledging that this work is now obsolete and stopping work on this task. |
💡 What:$O(N \times M)$ 의 오버헤드가 발생하기 때문입니다.
process_ignore_file함수 내에서 매 파일마다 정규표현식을 컴파일하던 병목을 바깥 루프에서 미리 컴파일하는 방식으로 수정했습니다. 또한 도달 불가능한 불필요한 조건문들을 제거하여 테스트 가능한 코드로 구조를 변경했습니다.🎯 Why: 매 파일마다 정규표현식을 컴파일하면 디렉토리 내 파일 수와 Ignore 규칙 수에 비례하여
📊 Impact: 디렉토리에 파일이 많고 Ignore 규칙이 여러 개일 때 인덱스 생성 소요 시간이 획기적으로 단축됩니다. 그리고 코드 베이스가 100% 테스트 커버리지를 가지게 되어 유지보수 안정성이 보장됩니다.
🔬 Measurement:
./gradlew test jacocoTestReport실행 후build/reports/jacoco/test/html/index.html파일을 열어 모든 클래스와 메서드에 대해 100% 커버리지를 확인합니다.PR created automatically by Jules for task 13634841104097907242 started by @seonghobae