HarshMehta112 opened a new pull request, #10461:
URL: https://github.com/apache/rocketmq/pull/10461
### Which Issue(s) This PR Fixes
- Fixes #10460
### Brief Description
`ProxyContext` is created on every gRPC/Remoting request. Its `value` map
used the default `HashMap` capacity (16, threshold 12), so adding the 10
`ContextVariable` keys plus interceptor entries triggers a
resize on the hot path. Pre-size the map to avoid it:
```java
private static final int DEFAULT_INITIAL_CAPACITY = 64;
private final Map<String, Object> value = new
HashMap<>(DEFAULT_INITIAL_CAPACITY);
```
No behavior or API change.
How Did You Test This Change?
Pure capacity refactor, no logic change. Existing proxy module tests pass.
--
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]