⚡ Bolt: HexFormat을 이용한 메모리 할당 및 16진수 변환 최적화#96
Conversation
- `ArtifactLinkService`, `DefaultDocumentConversionService` 내부의 `String.format("%02x")` 루프를 `HexFormat.formatHex()`로 대체하여 가비지 컬렉션 부하를 제거
- `HexFormat.of()`를 `static final` 상수로 캐싱하여 불필요한 인스턴스 생성을 방지
- 변경 사항에 대한 주석 및 CHANGELOG 추가
- 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. |
- `ArtifactLinkService`, `DefaultDocumentConversionService` 내부의 `String.format("%02x")` 루프를 `HexFormat.formatHex()`로 대체하여 가비지 컬렉션 부하를 제거
- `HexFormat.of()`를 `static final` 상수로 캐싱하여 불필요한 인스턴스 생성을 방지
- 변경 사항에 대한 주석 및 CHANGELOG 추가
- 100% 테스트 커버리지 유지 및 모든 테스트 통과 확인
- `ArtifactLinkService`, `DefaultDocumentConversionService` 내부의 `String.format("%02x")` 루프를 `HexFormat.formatHex()`로 대체하여 가비지 컬렉션 부하를 제거
- `HexFormat.of()`를 `static final` 상수로 캐싱하여 불필요한 인스턴스 생성을 방지
- 변경 사항에 대한 주석 및 CHANGELOG 추가
- CI에서 발생하던 보안 스캐너 (`trivy`, `osv-scanner`) 에러를 해결하기 위해 `spring-boot-starter-parent` 버전을 3.4.1로 업데이트하고 취약점이 해결된 `jackson-databind` 버전을 명시
- 100% 테스트 커버리지 유지 및 모든 테스트 통과 확인
- `ArtifactLinkService`, `DefaultDocumentConversionService` 내부의 `String.format("%02x")` 루프를 `HexFormat.formatHex()`로 대체하여 가비지 컬렉션 부하를 제거
- `HexFormat.of()`를 `static final` 상수로 캐싱하여 불필요한 인스턴스 생성을 방지
- 변경 사항에 대한 주석 및 CHANGELOG 추가
- CI에서 발생하던 보안 스캐너 (`trivy`, `osv-scanner`) 에러 및 로그 초과로 인한 `opencode-review` 시간 초과 문제를 해결하기 위해 `spring-boot-starter-parent` 버전을 3.5.3으로 업데이트하고, 취약점이 존재하는 `tika-parsers-standard-package`를 3.3.1로 업데이트
- 100% 테스트 커버리지 유지 및 모든 테스트 통과 확인
- `ArtifactLinkService`, `DefaultDocumentConversionService` 내부의 `String.format("%02x")` 루프를 `HexFormat.formatHex()`로 대체하여 가비지 컬렉션 부하를 제거
- `HexFormat.of()`를 `static final` 상수로 캐싱하여 불필요한 인스턴스 생성을 방지
- 변경 사항에 대한 주석 및 CHANGELOG 추가
- CI에서 발생하던 보안 스캐너 (`trivy`, `osv-scanner`) 에러 및 로그 초과로 인한 `opencode-review` 시간 초과 문제를 해결하기 위해 `spring-boot-starter-parent` 버전을 3.5.3으로 업데이트하고, 취약점이 존재하는 `tika-parsers-standard-package`를 3.3.1로 업데이트
- 100% 테스트 커버리지 유지 및 모든 테스트 통과 확인
💡 What:
String.format("%02x", byte)루프를 Java 17 표준의HexFormat.formatHex(bytes)로 교체했습니다.HexFormat.of()인스턴스를static final상수로 추출해 재사용하도록 변경했습니다.🎯 Why:
String,StringBuilder,Formatter,Object[]등 불필요한 중간 객체 생성이 발생하여 심각한 가비지 컬렉션 부하를 야기합니다.sha256Hex나contentHash와 같이 빈번히 사용되는 메서드에서는 이 오버헤드가 더 크게 작용합니다.📊 Impact:
🔬 Measurement:
mvn clean test및jacoco를 통해 변경 사항이 기능을 해치지 않고 100% 테스트 커버리지를 그대로 유지함을 확인했습니다.PR created automatically by Jules for task 10864668122786192559 started by @seonghobae