poorbarcode commented on code in PR #23231:
URL: https://github.com/apache/pulsar/pull/23231#discussion_r1746466858
##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentStickyKeyDispatcherMultipleConsumers.java:
##########
@@ -183,22 +180,6 @@ public synchronized void removeConsumer(Consumer consumer)
throws BrokerServiceE
}
}
- private static final FastThreadLocal<Map<Consumer, List<Entry>>>
localGroupedEntries =
Review Comment:
> - Remove the unnecessary thread-local fields localGroupedEntries and the
unused localGroupedPositions.
> - It is unnecessary to eliminate the creation of short-lived objects in
modern JVMs. It just clutters the code without any performance benefit. "No
garbage" style is relevant mainly for long-lived objects stored in caches or
large array allocations.
I am thinking about whether the "No garbage" design of Netty is unnecessary.
--
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]