Skip to content

Commit

Permalink
increase block and max message size
Browse files Browse the repository at this point in the history
  • Loading branch information
abyrd committed Oct 28, 2015
1 parent 4e08805 commit 26deed7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/main/java/com/conveyal/osmlib/DeflatedBlockWriter.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class DeflatedBlockWriter extends OutputStream implements Runnable {
* The maximum expected size of an encoded but uncompressed entity.
* A block will be considered finished when it is within this distance of the maximum block size.
*/
public static final int MAX_MESSAGE_SIZE = 1024 * 16;
public static final int MAX_MESSAGE_SIZE = 1024 * 64;

/** A zero-length BlockingQueue that hands tasks to the compression/writing pipeline stage without buffering them. */
private final SynchronousQueue<VEXBlock> synchronousQueue = new SynchronousQueue<>();
Expand Down Expand Up @@ -58,7 +58,7 @@ public DeflatedBlockWriter(OutputStream downstream) {
}

/**
* Hand off a block for writing. Handing off a block with element type NONE signals the end of ourput, and
* Hand off a block for writing. Handing off a block with element type NONE signals the end of output, and
* will shut down the writer thread.
*/
private void handOff(VEXBlock vexBlock) {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/conveyal/osmlib/VEXBlock.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public class VEXBlock {
public static final VEXBlock END_BLOCK = new VEXBlock();

/** Large blocks are not better. Stepping size down (32, 16, 8, 4, 2, 1MB) best size is achieved at 2MB. */
public static final int BUFFER_SIZE = 1024 * 1024 * 1;
public static final int BUFFER_SIZE = 1024 * 1024 * 2;

/** Header strings for each kind of OSM entity. TODO move this to OSMEntity. */
private static final byte[][] HEADERS = new byte[][] {
Expand Down

0 comments on commit 26deed7

Please sign in to comment.