Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(412)

Unified Diff: sdk/lib/io/secure_socket.dart

Issue 11819062: Speed up secure sockets by increasing encrypted buffer size. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/bin/secure_socket.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/io/secure_socket.dart
diff --git a/sdk/lib/io/secure_socket.dart b/sdk/lib/io/secure_socket.dart
index 2ece3c92d3ac6d2d6ef6431ec6f0ad63b8979ed3..12ac7e090b690217517ee9fca6283f5198eec7b6 100644
--- a/sdk/lib/io/secure_socket.dart
+++ b/sdk/lib/io/secure_socket.dart
@@ -641,7 +641,10 @@ class _SecureSocket implements SecureSocket {
class _ExternalBuffer {
+ // Performance is improved if a full buffer of plaintext fits
+ // in the encrypted buffer, when encrypted.
static final int SIZE = 8 * 1024;
+ static final int ENCRYPTED_SIZE = 10 * 1024;
_ExternalBuffer() : start = 0, length = 0;
// TODO(whesse): Consider making this a circular buffer. Only if it helps.
@@ -653,7 +656,7 @@ class _ExternalBuffer {
}
}
- int get free => SIZE - (start + length);
+ int get free => data.length - (start + length);
List data; // This will be a ExternalByteArray, backed by C allocated data.
int start;
« no previous file with comments | « runtime/bin/secure_socket.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698