wang-jiahua commented on code in PR #10444:
URL: https://github.com/apache/rocketmq/pull/10444#discussion_r3389095822


##########
common/src/main/java/org/apache/rocketmq/common/message/MessageConst.java:
##########
@@ -102,6 +106,18 @@ public class MessageConst {
 
     public static final HashSet<String> STRING_HASH_SET = new HashSet<>(64);
 
+    // Mirrors STRING_HASH_SET. Used by MessageDecoder.string2messageProperties
+    // to swap freshly-allocated key substrings for the canonical interned 
String,
+    // dropping ~50B per well-known key per message under load.
+    public static final Map<String, String> STRING_INTERN_MAP = new 
HashMap<>(128);

Review Comment:
   Good catch — fixed in e9e34a22f.
   
   - `STRING_INTERN_MAP` has been removed entirely. It was only used as a 
build-time intermediate for `STRING_INTERN_BY_LEN` and had no hot-path callers.
   - `STRING_INTERN_BY_LEN` has been changed from `public` to package-private 
(`static final`). `MessageDecoder` is in the same package and can access it 
directly; no external callers exist.



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