Index: sql/connection.h |
diff --git a/sql/connection.h b/sql/connection.h |
index 049d7cf5b4e2f9715ffc4b7f67dd2e89dc367bff..21b3e13bbf58aa92c0e5369f3af9cb4b5aed425c 100644 |
--- a/sql/connection.h |
+++ b/sql/connection.h |
@@ -140,6 +140,16 @@ class SQL_EXPORT Connection { |
// This must be called before Open() to have an effect. |
void set_exclusive_locking() { exclusive_locking_ = true; } |
+ |
+ // Call to have the database use the default lookaside buffer for small object |
+ // allocations. The lookaside buffer is intended to provide a speed boost when |
+ // running with slow malloc implementations. However, under typical use-cases |
+ // in Chrome, it seem to have no negligible impact while costing 50KB per |
+ // connection, therefore we disable it by default. |
+ // |
+ // This must be called before Open() to have an effect. |
+ void set_enable_lookaside_buffer() { enable_lookaside_buffer_ = true; } |
+ |
Scott Hess - ex-Googler
2013/06/04 16:35:21
IMHO, this is either the right thing to do, or not
rmcilroy
2013/06/04 17:05:38
Done.
|
// Set an error-handling callback. On errors, the error number (and |
// statement, if available) will be passed to the callback. |
// |
@@ -496,6 +506,7 @@ class SQL_EXPORT Connection { |
int page_size_; |
int cache_size_; |
bool exclusive_locking_; |
+ bool enable_lookaside_buffer_; |
// All cached statements. Keeping a reference to these statements means that |
// they'll remain active. |