From: Andi Gutmans Date: Sun, 3 Sep 2000 19:57:06 +0000 (+0000) Subject: - Increase buffers of output buffering to 40KB and 10KB increments which X-Git-Tag: php-4.0.3RC1~334 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e47d4fe249f06068c26a0464b3e718f499502eaa;p=php - Increase buffers of output buffering to 40KB and 10KB increments which makes more sense when web pages are typically like 10KB-20KB. I think it would be best to change the reallocation algorithm at least to redoubling when it's full instead of incrementing and possibly use a data structure similar to Zend/zend_static_allocator which uses memory blocks and not realloc(). --- diff --git a/ext/standard/output.c b/ext/standard/output.c index 7ef875aa3f..169ad2cd9e 100644 --- a/ext/standard/output.c +++ b/ext/standard/output.c @@ -95,7 +95,7 @@ PHPAPI int php_start_ob_buffer(zval *output_handler) if (OG(lock)) { return FAILURE; } - php_ob_init(4096, 1024, output_handler); + php_ob_init(40*1024, 10*1024, output_handler); OG(php_body_write) = php_b_body_write; return SUCCESS; } diff --git a/main/output.c b/main/output.c index 7ef875aa3f..169ad2cd9e 100644 --- a/main/output.c +++ b/main/output.c @@ -95,7 +95,7 @@ PHPAPI int php_start_ob_buffer(zval *output_handler) if (OG(lock)) { return FAILURE; } - php_ob_init(4096, 1024, output_handler); + php_ob_init(40*1024, 10*1024, output_handler); OG(php_body_write) = php_b_body_write; return SUCCESS; }