cvs: php4 /ext/standard output.c
| From: | Andi Gutmans | Date: | Sun, 03 Sep 2000 19:57:07 +0000 |
| Subject: | cvs: php4 /ext/standard output.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-1531@lists.php.net to get a copy of this message | ||
andi Sun Sep 3 12:57:07 2000 EDT
Modified files:
/php4/ext/standard output.c
Log:
- 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().
Index: php4/ext/standard/output.c
diff -u php4/ext/standard/output.c:1.30 php4/ext/standard/output.c:1.31
--- php4/ext/standard/output.c:1.30 Sun Sep 3 08:58:50 2000
+++ php4/ext/standard/output.c Sun Sep 3 12:57:06 2000
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: output.c,v 1.30 2000/09/03 15:58:50 zeev Exp $ */
+/* $Id: output.c,v 1.31 2000/09/03 19:57:06 andi Exp $ */
#include "php.h"
#include "ext/standard/head.h"
@@ -95,7 +95,7 @@
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;
}