Skip to content

Commit

Permalink
Revert "Keep the pipeline handler queue small initially"
Browse files Browse the repository at this point in the history
This reverts commit 30cdefc.
  • Loading branch information
jasontedor committed Feb 23, 2017
1 parent 072c81d commit 70d57b7
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@
*/
public class HttpPipeliningHandler extends ChannelDuplexHandler {

// we use a priority queue so that responses are ordered by their sequence number
private final PriorityQueue<HttpPipelinedResponse> holdingQueue;
private static final int INITIAL_EVENTS_HELD = 8;

private final int maxEventsHeld;

Expand All @@ -46,6 +45,9 @@ public class HttpPipeliningHandler extends ChannelDuplexHandler {
private int readSequence;
private int writeSequence;

// we use a priority queue so that responses are ordered by their sequence number
private final PriorityQueue<HttpPipelinedResponse> holdingQueue;

/**
* Construct a new pipelining handler; this handler should be used downstream of HTTP decoding/aggregation.
*
Expand All @@ -54,7 +56,7 @@ public class HttpPipeliningHandler extends ChannelDuplexHandler {
*/
public HttpPipeliningHandler(final int maxEventsHeld) {
this.maxEventsHeld = maxEventsHeld;
this.holdingQueue = new PriorityQueue<>(1);
this.holdingQueue = new PriorityQueue<>(INITIAL_EVENTS_HELD);
}

@Override
Expand Down

0 comments on commit 70d57b7

Please sign in to comment.