Skip to content

⚡ Bolt: [performance improvement] - #602

Closed
seonghobae wants to merge 3 commits into
masterfrom
bolt/optimize-escape-html-15634270611955827127
Closed

⚡ Bolt: [performance improvement]#602
seonghobae wants to merge 3 commits into
masterfrom
bolt/optimize-escape-html-15634270611955827127

Conversation

@seonghobae

@seonghobae seonghobae commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

Verified successor: #614 (506413152d613cb145c81e67e39ad1a6139ca4f1) carries the same valid product intent—replace the six-character when lookup in escapeHtml() with a bounded 128-entry ASCII table—on the newer protected master lineage, and adds focused parity coverage for Korean/Japanese text, emoji/surrogate input, empty input, and mixed ASCII. #614 is also already Draft with an evidence boundary that rejects unmeasured branch-misprediction, CPU, and buyer-latency claims.

This PR's only unique delta is the older branch-local .jules/bolt.md rule asserting a universal 10–15% speedup and preferring array lookup before a reproducible JVM/JIT benchmark. ./gradlew test jacocoTestReport proves functional/coverage behavior, not that performance claim, so that journal delta is intentionally not inherited.

All valid source intent is preserved by #614 with stronger executable evidence and a current protected-base repair path. Close this older duplicate rather than maintaining two implementations. #614 must still satisfy its benchmark/equivalence and exact-head terminal-gate requirements before promotion.

@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.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Devin Review found 1 potential issue.

Devin Review

else -> null
}
val cInt = c.toInt()
val replacement = if (cInt < 128) HtmlEscaper.REPLACEMENTS[cInt] else null

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔍 Non-ASCII branch lacks coverage

Existing escape tests never take the new cInt < 128 false branch. The mandatory 100% JaCoCo gate can reject this change.

Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

@coderabbitai

coderabbitai Bot commented Sep 2, 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: Team

Run ID: f14e1deb-6369-4ead-a8b2-438a3cfa35be

📥 Commits

Reviewing files that changed from the base of the PR and between ce55268 and f9a522f.

📒 Files selected for processing (2)
  • .jules/bolt.md
  • src/main/kotlin/html4tree/main.kt

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


📝 Walkthrough

Walkthrough

HTML 이스케이프 구현이 when 분기에서 128개 항목의 배열 조회 방식으로 변경되었습니다. 특수 문자 치환 결과와 128 이상 문자 처리는 기존 동작을 유지합니다. 최적화 지침도 추가되었습니다.

Changes

HTML 이스케이프 최적화

Layer / File(s) Summary
고정 배열 기반 이스케이프 구현
.jules/bolt.md, src/main/kotlin/html4tree/main.kt
HtmlEscaper.REPLACEMENTS 배열에 특수 문자 엔티티를 저장합니다. escapeHtml()은 128 미만 문자를 배열 인덱스로 조회합니다. 128 이상 문자는 기존처럼 치환하지 않습니다. 최적화 지침을 문서에 추가했습니다.

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

Merge Risk: ⚪ Minimal · up to 2122d

This localized performance optimization preserves existing HTML escaping behavior and does not change deployment or integration boundaries; no actionable merge-blocking risk remains after normal checks and review.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 1 files. (1 skipped: 1… Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive 제목은 성능 개선이라는 실제 변경 방향을 나타냅니다. 그러나 escapeHtml()의 HTML 이스케이프 조회 최적화라는 핵심 변경을 설명하지 않아 구체성이 부족합니다. Optimize escapeHtml() HTML escaping with lookup table처럼 주요 대상과 변경 방식을 포함한 구체적인 제목으로 수정하세요.
✅ Passed checks (3 passed)
Check name Status Explanation
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Full details: Docstring Coverage

Explanation

Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 1 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI
✨ 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 bolt/optimize-escape-html-15634270611955827127

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 seonghobae closed this Sep 3, 2026
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