Ismael Juma created KAFKA-15959:
-----------------------------------
Summary: Replace byte handling classes with synchronized methods
Key: KAFKA-15959
URL: https://issues.apache.org/jira/browse/KAFKA-15959
Project: Kafka
Issue Type: Improvement
Reporter: Ismael Juma
The JDK has a number of old byte handling classes that have a number of
synchronized methods. This wasn't too bad until biased locking was disabled by
default in Java 17 and removed in Java 21.
The overhead now can be significant if one such method happens to be in the hot
path. And such overhead is unnecessary if the classes are used by a single
thread (which is very common).
The classes we should replace:
# ByteArrayInputStream
#
ByteArrayOutputStream
#
DataOutputStream
# BufferedInputStream
# BufferedOutputStream
--
This message was sent by Atlassian Jira
(v8.20.10#820010)