]> granicus.if.org Git - php/commitdiff
- Increase buffers of output buffering to 40KB and 10KB increments which
authorAndi Gutmans <andi@php.net>
Sun, 3 Sep 2000 19:57:06 +0000 (19:57 +0000)
committerAndi Gutmans <andi@php.net>
Sun, 3 Sep 2000 19:57:06 +0000 (19:57 +0000)
  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().

ext/standard/output.c
main/output.c

index 7ef875aa3fba7113950ae97b853f9456266268f1..169ad2cd9e7a53098dec7af612ef8f9db37c3cf1 100644 (file)
@@ -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;
 }
index 7ef875aa3fba7113950ae97b853f9456266268f1..169ad2cd9e7a53098dec7af612ef8f9db37c3cf1 100644 (file)
@@ -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;
 }