Gopal V created HDFS-14345: ------------------------------ Summary: fs.BufferedFSInputStream::read is synchronized Key: HDFS-14345 URL: https://issues.apache.org/jira/browse/HDFS-14345 Project: Hadoop HDFS Issue Type: Bug Reporter: Gopal V
BufferedInputStream::read() has performance issues - this can be fixed by wrapping the stream in another non-synchronized buffered inputstream, but that incurs memory copy overheads and is sub-optimal. https://github.com/openjdk/jdk/blob/master/src/java.base/share/classes/java/io/BufferedInputStream.java#L269 Hadoop fs streams aren't thread-safe (except for ReadFully) and are stateful for position, so this synchronization is purely a tax without benefit. -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-dev-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-dev-h...@hadoop.apache.org