Skip to content

⚡ Bolt: ERD 핸들 ID 생성 최적화 - #937

Closed
seonghobae wants to merge 2 commits into
mainfrom
jules-17085813566366809228-03f11211
Closed

⚡ Bolt: ERD 핸들 ID 생성 최적화#937
seonghobae wants to merge 2 commits into
mainfrom
jules-17085813566366809228-03f11211

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

💡 What: frontend/src/erd/handleUtils.ts 파일의 sanitizeHandleId 함수에서 Array.fromfor...of 루프로 교체했습니다.
🎯 Why: sanitizeHandleId는 모든 열과 에지에 대해 ID를 생성할 때 호출되는 매우 빈번한 경로(hot path)입니다. Array.from(string)은 문자열을 배열로 변환하면서 임시 배열을 할당하므로, 대규모 ERD 렌더링 시 불필요한 메모리 할당 및 가비지 컬렉션(GC) 압박을 가중시킵니다. for...of 루프를 사용하면 이러한 중간 할당을 방지할 수 있습니다.
📊 Impact: 큰 모델에 대해 그래프를 탐색하고 렌더링하거나 내보낼 때 메모리 할당 및 GC 오버헤드를 줄여 렌더링 성능을 부드럽게 합니다.
🔬 Measurement: 프론트엔드의 모든 유닛 테스트가 통과되었으며 기능적인 변경이 없음을 확인했습니다.


PR created automatically by Jules for task 17085813566366809228 started by @seonghobae

Summary by CodeRabbit

  • 버그 수정

    • 빈 ERD 핸들 입력이 올바르게 처리되도록 개선했습니다.
    • 일반 핸들 값의 인코딩 결과와 호환성을 유지했습니다.
  • 성능 개선

    • ERD 핸들 생성 과정의 불필요한 중간 배열 생성을 줄여 처리 효율을 높였습니다.

@google-labs-jules

Copy link
Copy Markdown

👋 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 @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@coderabbitai

coderabbitai Bot commented Aug 20, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 231da4f5-1ae0-4493-a1eb-36047d465750

📥 Commits

Reviewing files that changed from the base of the PR and between af235d5 and c016cd3.

📒 Files selected for processing (2)
  • .jules/bolt.md
  • frontend/src/erd/handleUtils.ts

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

sanitizeHandleId가 빈 입력을 즉시 처리합니다. 문자열 인코딩은 Array.fromjoin 대신 for...of와 직접 누적을 사용합니다. 관련 최적화 지침도 추가했습니다.

Changes

ERD 핸들 생성 최적화

Layer / File(s) Summary
sanitizeHandleId 순회 및 빈 입력 처리
frontend/src/erd/handleUtils.ts, .jules/bolt.md
빈 문자열을 c-empty로 반환합니다. 문자열을 for...of로 순회하고 코드 포인트 인코딩 결과를 직접 누적합니다. 중간 배열 할당을 피하는 지침을 추가했습니다.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to c016c

This change reduces temporary allocations while generating ERD handle IDs without changing the intended behavior. No actionable merge-blocking risk remains after normal checks and review.

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목은 ERD 핸들 ID 생성 최적화라는 주요 변경 사항을 간결하고 명확하게 설명합니다.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch jules-17085813566366809228-03f11211

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@seonghobae

Copy link
Copy Markdown
Collaborator Author

@OpenCode review

@seonghobae
seonghobae enabled auto-merge August 20, 2026 02:43
@seonghobae

Copy link
Copy Markdown
Collaborator Author

This optimization is superseded by the benchmarked, documented #884, which covers the same sanitizeHandleId hot path with Unicode regression tests, doctoring, and reproducible evidence. Keeping both open would duplicate the change; #884 remains the canonical PR.

@seonghobae
seonghobae disabled auto-merge August 20, 2026 05:54
@seonghobae

Copy link
Copy Markdown
Collaborator Author

Closed as duplicate of #884 after preserving the stronger benchmarked implementation as the canonical path.

@seonghobae seonghobae closed this Aug 20, 2026
@google-labs-jules

Copy link
Copy Markdown

This optimization is superseded by the benchmarked, documented #884, which covers the same sanitizeHandleId hot path with Unicode regression tests, doctoring, and reproducible evidence. Keeping both open would duplicate the change; #884 remains the canonical PR.

Understood. Acknowledging that this work is now obsolete and stopping work on this task.

@google-labs-jules

Copy link
Copy Markdown

Closed as duplicate of #884 after preserving the stronger benchmarked implementation as the canonical path.

Understood. Acknowledging that this work is now obsolete and stopping work on this task.

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