Skip to content

Commit

Permalink
[JENKINS-36871] Switch to FastByteBufferQueueInputStream
Browse files Browse the repository at this point in the history
- We don't need the general purpose mark support or unbounded reads, so lets get more performance
  • Loading branch information
stephenc committed Aug 5, 2016
1 parent 8e595fc commit 3c0db40
Showing 1 changed file with 2 additions and 3 deletions.
Expand Up @@ -31,9 +31,8 @@
import java.util.logging.Logger;
import javax.annotation.Nonnull;
import org.jenkinsci.remoting.util.ByteBufferQueue;
import org.jenkinsci.remoting.util.ByteBufferQueueInputStream;
import org.jenkinsci.remoting.util.ByteBufferQueueOutputStream;
import org.jenkinsci.remoting.util.ByteBufferUtils;
import org.jenkinsci.remoting.util.FastByteBufferQueueInputStream;
import org.jenkinsci.remoting.util.IOUtils;

/**
Expand Down Expand Up @@ -195,7 +194,7 @@ public final synchronized void receive(@Nonnull ByteBuffer data) throws IOExcept

private void processCommand() throws IOException {
try {
ByteBufferQueueInputStream is = new ByteBufferQueueInputStream(receiveQueue, readCommandSizes[0]);
FastByteBufferQueueInputStream is = new FastByteBufferQueueInputStream(receiveQueue, readCommandSizes[0]);
try {
ObjectInputStreamEx ois = new ObjectInputStreamEx(is, channel.baseClassLoader, channel.classFilter);
receiver.handle(Command.readFrom(channel, ois));
Expand Down

0 comments on commit 3c0db40

Please sign in to comment.