Skip to content

perf: [TA-273] Location/RegionCluster 렌더 시 문자열 파싱 반복(O(n*m)) + 토글 리스트 index key - #151

Merged
seorinn merged 1 commit into
developfrom
TA-273-region-render-opt
Jun 30, 2026
Merged

seorinn merged 1 commit into
developfrom
TA-273-region-render-opt

Conversation

@seorinn

@seorinn seorinn commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator

변경 사항

  • Location: 선택 여부를 locs.some(split×2) → selectedSet(useMemo Set) has(item) O(1)로, regions/하단 칩 key를 값 기반 안정 key로
  • RegionCluster: 선택 여부 Set 조회, 선택 하이라이트 버그 수정(기존 locs.includes(item)이 저장 포맷 category 전체/category name과 달라 칩이 항상 비선택 → fullname 기준 판정), 토글 리스트 key를 fullname/값 기반으로

배경

지역 그리드가 셀마다 split을 여러 번 호출하고 some으로 O(R*L) 선택 판정. 토글되는 리스트에 index key 사용. RegionCluster는 선택 표시가 아예 동작하지 않던 버그 존재.

검증

  • tsc·전체 테스트 통과
  • fullname 판정이 handleAddRegion 저장 포맷과 일치 확인(clusters[0]=category 전제)
  • 참고: region명 공백 가정은 기존 split 저장과 동일(신규 회귀 아님)

Closes TA-273

@vercel

vercel Bot commented Jun 30, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
damaba Ready Ready Preview, Comment Jun 30, 2026 4:56am

@seorinn
seorinn marked this pull request as ready for review June 30, 2026 04:57
@seorinn
seorinn merged commit ee2fdaa into develop Jun 30, 2026
3 checks passed
@seorinn
seorinn deleted the TA-273-region-render-opt branch June 30, 2026 04:57

This branch was successfully deployed

1 active deployment
Preview — a140661b Deployed Jun 30, 2026 by vercel[bot]
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