forked from I2P_Developers/i2p.i2p
* started reducing the temporary buffers created within various crypto methods , as we've
got some pretty heavy GC churn when under load. rough estimate is we allocate 5-8x as much data as we need, copying it all over the place before forwarding it (or processing it). this should cut down a few of those copies, but not enough yet. it'd be great to get that down to 2x. * lots of logging
This commit is contained in:
@@ -89,7 +89,7 @@ public class TunnelMessage extends I2NPMessageImpl {
|
||||
if ( (_tunnelId == null) || (_data == null) || (_data.length <= 0) )
|
||||
throw new I2NPMessageException("Not enough data to write out");
|
||||
|
||||
ByteArrayOutputStream os = new ByteArrayOutputStream(4096);
|
||||
ByteArrayOutputStream os = new ByteArrayOutputStream(64+_data.length);
|
||||
try {
|
||||
_tunnelId.writeBytes(os);
|
||||
if (_log.shouldLog(Log.DEBUG))
|
||||
|
||||
Reference in New Issue
Block a user