[club] autoSizeColumn 제거, 고정 폭 적용 - #424
Open
ZaMan0806 wants to merge 2 commits into
Open
Conversation
There was a problem hiding this comment.
-
Overview
- 동아리 엑셀 생성 로직에서
autoSizeColumn호출을 제거하고, 컬럼별 고정 폭(setColumnWidth)을 적용하도록 변경했습니다.
- 동아리 엑셀 생성 로직에서
-
Intent
autoSizeColumn의 AWT 폰트 렌더링 기반 셀 실측으로 인한 불필요한 CPU 비용 제거- 동아리 엑셀은 컬럼 구성이 고정되어 있어 고정 폭으로도 충분하다는 판단
- 경미하지만 확인 가능한 엑셀 생성 성능 개선
-
Risk
- 전체적으로 낮은 리스크
- 리뷰 시점에 중점적으로 확인할 부분:
- 고정 폭이 너무 좁아 동아리명, 담당자명 등 긴 텍스트가 잘릴 가능성
- 한글/특수문자/긴 값 포함 케이스에서 가독성 유지 여부
- 기존 테스트 통과 확인은 언급되어 있으나, 실제 생성된 엑셀 화면 확인 필요
2 inline comment(s)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
개요
CreateClubExcelServiceImpl의 동아리 엑셀 생성 로직에서autoSizeColumn호출을 제거하고 고정 컬럼 폭(setColumnWidth)으로 대체하였습니다.본문
autoSizeColumn은 AWT 폰트 렌더링을 이용해 컬럼별로 전체 행을 순회하며 셀 너비를 실측하는 고비용 연산입니다. 동아리 엑셀은 컬럼 구성이 고정되어 있어 자동 폭 계산이 굳이 필요하지 않다고 판단하여, 각 컬럼에 적절한 고정 폭을 지정하는 방식으로 변경하였습니다.동일한 항목을 다루는
CreateStudentExcelServiceImpl에는 원래autoSizeColumn호출이 없었으며, 프로젝트 전체를 검색한 결과 이번에 수정한CreateClubExcelServiceImpl이 유일한 사용처였습니다.POI
XSSFWorkbook생성 및 직렬화만 분리하여 측정한 결과는 다음과 같습니다.autoSizeColumnsetColumnWidth절대 시간 자체는 크지 않아 전체 API 응답 시간(DB 조회, 네트워크 전송 포함) 대비 체감 개선은 제한적일 수 있으나, 불필요한 CPU 연산을 제거하여 확인 가능한 성능 이득을 확보하였습니다.
기존
CreateClubExcelServiceTest테스트가 정상 통과함을 확인하였습니다.