wang-jiahua opened a new pull request, #10491:
URL: https://github.com/apache/rocketmq/pull/10491

   ## Summary
   
   Three independent per-RPC micro-allocations eliminated:
   
   ### 1. Logback `NopStatusListener`
   Add `<statusListener class="ch.qos.logback.core.status.NopStatusListener"/>` 
to `rmq.broker.logback.xml` to suppress Logback internal status event callbacks.
   
   ### 2. `TopicMessageType.metricsValue` cache
   `getMetricsValue()` was calling `value.toLowerCase()` per invocation. Now 
caches `metricsValue` as a `final` field with `Locale.ROOT`.
   
   ### 3. `RemotingHelper` eager evaluation fix
   `Map.getOrDefault(code, String.valueOf(code))` eagerly evaluates 
`String.valueOf(code)` even on cache hit. Changed to `get()` + null check.
   
   ## Dependency
   
   Stacked on PR #10443. Currently includes #10443 changes in the diff; will 
rebase on `develop` after #10443 merges to show only the 3 files above.
   
   ## Files (delta on top of #10443)
   
   | File | Change |
   |---|---|
   | `broker/src/main/resources/rmq.broker.logback.xml` | +2: NopStatusListener 
|
   | `common/.../attribute/TopicMessageType.java` | +3/-1: `metricsValue` 
cached field with `Locale.ROOT` |
   | `remoting/.../common/RemotingHelper.java` | +4/-2: `getOrDefault` → `get` 
+ null check |


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