asdf2014 commented on a change in pull request #5957: Various changes URL: https://github.com/apache/incubator-druid/pull/5957#discussion_r200844411
########## File path: processing/src/main/java/io/druid/collections/spatial/ImmutableRTree.java ########## @@ -75,7 +74,7 @@ public static ImmutableRTree newImmutableFromMutable(RTree rTree) return empty(); } - ByteBuffer buffer = ByteBuffer.wrap(new byte[calcNumBytes(rTree)]); + ByteBuffer buffer = ByteBuffer.allocate(calcNumBytes(rTree)); Review comment: Maybe using `ByteBuffer.allocateDirect` will get better performance. ```java ByteBuffer buffer = ByteBuffer.allocateDirect(calcNumBytes(rTree)); ``` ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@druid.apache.org For additional commands, e-mail: dev-h...@druid.apache.org