summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndi Gutmans <andi@php.net>2000-09-03 19:57:06 +0000
committerAndi Gutmans <andi@php.net>2000-09-03 19:57:06 +0000
commite47d4fe249f06068c26a0464b3e718f499502eaa (patch)
treefc1e4c997a5dfc2d4bb5f55241fa06d6a197e374
parent799a00f19a61922f88a4738a91bd34bf3e583d54 (diff)
downloadphp-git-e47d4fe249f06068c26a0464b3e718f499502eaa.tar.gz
- 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().
-rw-r--r--ext/standard/output.c2
-rw-r--r--main/output.c2
2 files changed, 2 insertions, 2 deletions
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;
}