Skip to content

[Enhancement] Reuse MD5 digest and avoid UTF-8 length allocations - #11028

Draft
zjncs wants to merge 1 commit into
apache:developfrom
zjncs:perf/reuse-md5-utf8-length
Draft

[Enhancement] Reuse MD5 digest and avoid UTF-8 length allocations#11028
zjncs wants to merge 1 commit into
apache:developfrom
zjncs:perf/reuse-md5-utf8-length

Conversation

@zjncs

@zjncs zjncs commented Sep 5, 2026

Copy link
Copy Markdown

Fixes #10976

Summary

  • reuse one MD5 MessageDigest per thread, resetting it for each calculation
  • compute UTF-8 encoded lengths without allocating temporary byte arrays on the gRPC send path
  • preserve Java UTF-8 replacement behavior for unpaired surrogates

Verification

  • git diff --check passed
  • Maven is unavailable locally; CI should run common and proxy test suites

AI-assisted contribution; reviewed locally.

Signed-off-by: zjncs <18910855655@163.com>
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.

[Enhancement] Avoid per-message MessageDigest lookup and length-only getBytes allocations on the proxy gRPC path

1 participant