From 8f9af12fdb0947b76687f9a89fffff6206fffb04 Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Thu, 10 Feb 2005 04:39:23 +0000 Subject: [PATCH] Use a direct buffer for our overflow queue partial buffer as well because there will be relatively few of those (at most one per client that is experiencing lag) and while the client is experiencing lag we will be trying to write their data once per pass through the sockets (which could be hundreds of times a second) and we don't want each write attempt to result in the creation of a temporary direct buffer. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3345 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- .../com/threerings/presents/server/net/ConnectionManager.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/java/com/threerings/presents/server/net/ConnectionManager.java b/src/java/com/threerings/presents/server/net/ConnectionManager.java index 926c016ec..553a7e2e2 100644 --- a/src/java/com/threerings/presents/server/net/ConnectionManager.java +++ b/src/java/com/threerings/presents/server/net/ConnectionManager.java @@ -1,5 +1,5 @@ // -// $Id: ConnectionManager.java,v 1.43 2004/08/27 02:20:24 mdb Exp $ +// $Id$ // // Narya library - tools for developing networked games // Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved @@ -716,7 +716,7 @@ public class ConnectionManager extends LoopingThread public void handlePartialWrite (Connection conn, ByteBuffer buffer) { // set up our _partial buffer - _partial = ByteBuffer.allocate(buffer.remaining()); + _partial = ByteBuffer.allocateDirect(buffer.remaining()); _partial.put(buffer); _partial.flip(); }