RockteMQ-AI commented on issue #11002:
URL: https://github.com/apache/rocketmq/issues/11002#issuecomment-5523361975

   **Issue Evaluation**
   
   Category: `type/enhancement` | Status: **Evaluated**
   
   **Feasibility:** Feasible
   **Scope:** `store/MessageExtEncoder` (topic bytes caching) + 
`common/protocol/MessageDecoder` (CRC32 key bytes)
   **Compatibility:** No breaking changes — output is identical
   
   Solid optimization targeting two per-message `String.getBytes()` allocations 
on the broker write path. The approach is well-reasoned:
   
   - **`MessageExtEncoder`**: Single-slot cache leveraging the existing 
`ThreadLocal` nature of the encoder — no synchronization needed, and 
mixed-topic traffic degrades gracefully (one string comparison per miss).
   - **`MessageDecoder`**: Pre-encoding `PROPERTY_CRC32` into a `static final 
byte[]` is trivially safe.
   
   The verification is thorough (multiple test suites pass, A/B cluster test 
shows flat TPS/GC). As noted, this is a cleanup-level allocation reduction 
rather than a throughput win, but it's a net positive with zero risk.
   
   Good candidate for contribution.
   
   ---
   *Automated evaluation by @RockteMQ-AI*


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to