Github user olegz commented on a diff in the pull request:
https://github.com/apache/nifi/pull/1202#discussion_r88307136
--- Diff:
nifi-commons/nifi-utils/src/main/java/org/apache/nifi/stream/io/BufferedInputStream.java
---
@@ -16,19 +16,445 @@
*/
package org.apache.nifi.stream.io;
+import java.io.IOException;
import java.io.InputStream;
/**
* This class is a slight modification of the BufferedInputStream in the
java.io package. The modification is that this implementation does not provide
synchronization on method calls, which means
* that this class is not suitable for use by multiple threads. However,
the absence of these synchronized blocks results in potentially much better
performance.
--- End diff --
I wonder if the performance statement above is actually true.
Synchronization by itself does not cause significant performance concerns (if
any). It only comes to play when more then one thread is involved. Perhaps
investigate and deprecate and use IO BufferedIS?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---