[refactor/#153] 엔티티 생성 성능 최적화를 위한 @PersistenceCreator 적용 #154
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
❤️ 기능 설명
현재 생성자가 전체 파라미터를 받지 않고있었고, 접근제어자가
private이었습니다.이는 객체지향적인 관점에서 설계한 것이었지만 스프링 공식문서를 읽어보니 이는 리플렉션을 초래해 성능상 단점이 있습니다.
이를 전체 파라미터를 받도록 개선하고, 접근제어자를
package-private로 바꾸고PersistenceCreator어노테이션을 통해 이 생성자로 객체 생성을 매핑하였습니다.문서상으로 이는 JPA의 엔티티 생성 성능을 약 30% 향상시키는 방법입니다.
swagger 테스트 성공 결과 스크린샷 첨부
연결된 issue
연결된 issue를 자동으로 닫기 위해 아래 {이슈넘버}를 입력해주세요.
close #153
🩷 Approve 하기 전 확인해주세요!
✅ 체크리스트