Skip to content

⚡ Bolt: Optimize handle ID generation to reduce GC overhead - #695

Closed
seonghobae wants to merge 2 commits into
mainfrom
jules-10965849098253387270-e38894d8
Closed

⚡ Bolt: Optimize handle ID generation to reduce GC overhead#695
seonghobae wants to merge 2 commits into
mainfrom
jules-10965849098253387270-e38894d8

Conversation

@seonghobae

Copy link
Copy Markdown
Collaborator

💡 What:
핸들 ID 생성 과정(frontend/src/erd/handleUtils.tssanitizeHandleId 함수)에서 문자열 반복 시 사용되던 Array.from(string).join('-') 방식을 for...of 루프와 직접적인 문자열 연결(concatenation) 방식으로 변경했습니다.

🎯 Why:
Array.from(string)을 사용하여 문자열을 배열로 변환한 후 다시 연결하는 작업은 빈번하게 호출되는 고빈도 경로(large graph의 노드 및 에지 핸들 ID 생성)에서 불필요한 중간 배열 할당을 발생시킵니다. 이로 인해 메모리 가비지 컬렉션(GC) 압박이 증가하고 UI 성능이 저하되는 병목 현상이 발생할 수 있습니다.

📊 Impact:
문자열 생성 시 배열 생성 및 .join 메서드 호출 과정을 생략하여, 중간 배열 할당 비용을 완전히 제거하고 GC 압박을 크게 완화했습니다. 이는 특히 복잡한 대형 ERD 다이어그램을 다룰 때 렌더링 지연을 방지하고 UI 반응성을 높이는 데 기여합니다.

🔬 Measurement:
프론트엔드 테스트 스위트(pnpm run test --run)를 실행하여 기능 저하가 없음을 확인했으며, 특히 frontend/src/erd/handleUtils.test.ts 파일의 테스트가 변경 후에도 모두 성공적으로 통과함을 검증했습니다. 유니코드 문자 처리 또한 기존과 동일하게 올바르게 동작합니다.


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

@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 1, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@seonghobae, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 11 seconds

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: dfb34185-427d-4121-afdf-4ee93af0a796

📥 Commits

Reviewing files that changed from the base of the PR and between 5b7d8d6 and 30d5ad7.

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

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

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

OpenCode cannot approve yet because required coverage evidence did not pass.

Review outcome

1. HIGH .github/workflows/opencode-review.yml:1 - Coverage evidence did not prove required test/docstring evidence

  • Problem: The required coverage-evidence job result was failure, so OpenCode cannot establish approval sufficiency for this head.

  • Root cause: Automated approval is only valid when the same-head coverage-evidence job proves supported repository test suites passed and configured docstring gates passed or were advisory, or reports not applicable because no supported source files or package manifests exist. Missing, failed, skipped, unavailable, or unsupported-tooling test evidence is a blocker.

  • Fix: Install or configure the repository test/docstring evidence tooling when source files or package manifests exist, rerun the current-head coverage-evidence job, and approve only after it reports success with required evidence or explicit no-source not-applicable evidence.

  • Regression test: Keep the approval branch checking needs.coverage-evidence.result == success before posting APPROVE, and publish REQUEST_CHANGES when coverage-evidence blocker states such as cancelled, skipped, failed, unsupported-tooling, or below-100 evidence are present.

  • Result: REQUEST_CHANGES

  • Reason: coverage-evidence result was failure, so required test/docstring evidence was not proven for current head 5ac10155eb62eb79db5f26a36d229f8af6f27bcc.

  • Head SHA: 5ac10155eb62eb79db5f26a36d229f8af6f27bcc

  • Workflow run: 30717591498

  • Workflow attempt: 1

Coverage evidence

Coverage Decision

  • Result: FAIL
  • Test evidence: not proven passing
  • Docstring evidence: not proven passing when configured
  • Failure count: 2

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Changed file: bolt.md"]
  S1 --> I1["repository behavior"]
  I1 --> R1["Review risk: Changed file: bolt.md"]
  R1 --> V1["required checks"]
  Evidence --> S2["Frontend: handleUtils.ts"]
  S2 --> I2["browser runtime and bundle"]
  I2 --> R2["Review risk: Frontend: handleUtils.ts"]
  R2 --> V2["frontend tests"]
Loading

@opencode-agent

opencode-agent Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

OpenCode Review Overview

  • Head SHA: 5ac10155eb62eb79db5f26a36d229f8af6f27bcc
  • Workflow run: 30717591498
  • Workflow attempt: 2
  • Gate result: REQUEST_CHANGES (approval step)

Pull request overview

OpenCode cannot approve yet because required coverage evidence did not pass.

Review outcome

1. HIGH .github/workflows/opencode-review.yml:1 - Coverage evidence did not prove required test/docstring evidence

  • Problem: The required coverage-evidence job result was failure, so OpenCode cannot establish approval sufficiency for this head.

  • Root cause: Automated approval is only valid when the same-head coverage-evidence job proves supported repository test suites passed and configured docstring gates passed or were advisory, or reports not applicable because no supported source files or package manifests exist. Missing, failed, skipped, unavailable, or unsupported-tooling test evidence is a blocker.

  • Fix: Install or configure the repository test/docstring evidence tooling when source files or package manifests exist, rerun the current-head coverage-evidence job, and approve only after it reports success with required evidence or explicit no-source not-applicable evidence.

  • Regression test: Keep the approval branch checking needs.coverage-evidence.result == success before posting APPROVE, and publish REQUEST_CHANGES when coverage-evidence blocker states such as cancelled, skipped, failed, unsupported-tooling, or below-100 evidence are present.

  • Result: REQUEST_CHANGES

  • Reason: coverage-evidence result was failure, so required test/docstring evidence was not proven for current head 5ac10155eb62eb79db5f26a36d229f8af6f27bcc.

  • Head SHA: 5ac10155eb62eb79db5f26a36d229f8af6f27bcc

  • Workflow run: 30717591498

  • Workflow attempt: 2

Coverage evidence

Coverage evidence job did not run or did not publish coverage evidence.

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Changed file: bolt.md"]
  S1 --> I1["repository behavior"]
  I1 --> R1["Review risk: Changed file: bolt.md"]
  R1 --> V1["required checks"]
  Evidence --> S2["Frontend: handleUtils.ts"]
  S2 --> I2["browser runtime and bundle"]
  I2 --> R2["Review risk: Frontend: handleUtils.ts"]
  R2 --> V2["frontend tests"]
Loading

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

OpenCode cannot approve yet because required coverage evidence did not pass.

Review outcome

1. HIGH .github/workflows/opencode-review.yml:1 - Coverage evidence did not prove required test/docstring evidence

  • Problem: The required coverage-evidence job result was failure, so OpenCode cannot establish approval sufficiency for this head.

  • Root cause: Automated approval is only valid when the same-head coverage-evidence job proves supported repository test suites passed and configured docstring gates passed or were advisory, or reports not applicable because no supported source files or package manifests exist. Missing, failed, skipped, unavailable, or unsupported-tooling test evidence is a blocker.

  • Fix: Install or configure the repository test/docstring evidence tooling when source files or package manifests exist, rerun the current-head coverage-evidence job, and approve only after it reports success with required evidence or explicit no-source not-applicable evidence.

  • Regression test: Keep the approval branch checking needs.coverage-evidence.result == success before posting APPROVE, and publish REQUEST_CHANGES when coverage-evidence blocker states such as cancelled, skipped, failed, unsupported-tooling, or below-100 evidence are present.

  • Result: REQUEST_CHANGES

  • Reason: coverage-evidence result was failure, so required test/docstring evidence was not proven for current head 5ac10155eb62eb79db5f26a36d229f8af6f27bcc.

  • Head SHA: 5ac10155eb62eb79db5f26a36d229f8af6f27bcc

  • Workflow run: 30717591498

  • Workflow attempt: 2

Coverage evidence

Coverage evidence job did not run or did not publish coverage evidence.

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Changed file: bolt.md"]
  S1 --> I1["repository behavior"]
  I1 --> R1["Review risk: Changed file: bolt.md"]
  R1 --> V1["required checks"]
  Evidence --> S2["Frontend: handleUtils.ts"]
  S2 --> I2["browser runtime and bundle"]
  I2 --> R2["Review risk: Frontend: handleUtils.ts"]
  R2 --> V2["frontend tests"]
Loading

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@google-labs-jules

Copy link
Copy Markdown

@coderabbitai review

This is a bot command for another bot (@coderabbitai). No action or reply is needed from me.

Copy link
Copy Markdown
Collaborator Author

Closing as superseded by #700. The canonical PR now contains the same Unicode-safe for...of encoder without intermediate arrays, together with the related decoder/export optimization and expanded regression coverage. Consolidating avoids overlapping handleUtils.ts conflicts.

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

Copy link
Copy Markdown

Closing as superseded by #700. The canonical PR now contains the same Unicode-safe for...of encoder without intermediate arrays, together with the related decoder/export optimization and expanded regression coverage. Consolidating avoids overlapping handleUtils.ts conflicts.

Understood. Acknowledging that this work is now superseded by #700 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