Still behind a bit on my email. Has anyone tested this yet? It would be
cool to commit.
Delivered-To: alias-zend-andi@zend.com
Date: Sun, 24 Oct 2004 13:10:20 +0200 (CEST)
From: Sascha Schumann sascha@schumann.cx
X-X-Sender: sas@lx
To: Wez Furlong kingwez@gmail.com
Cc: Andi Gutmans andi@zend.com, internals internals@lists.php.net
Subject: Re: [PHP-DEV] Re: PHP 5.1 roadmap
X-Security: message sanitized on mail.zend.com
See http://www.impsec.org/email-tools/sanitizer-intro.html
for details. $Revision: 1.143 $Date: 2004-04-10 09:05:42-07
X-Bogosity: No, tests=bogofilter, spamicity=0.000000, version=0.13.6.2The specific case I had was serializing an array containing a whole
bunch of arrays representing the data from tables in a database. I
don't recall how many rows there were, but the serialized data was
around 5 MB. This was on windows, and feels like realloc doing
over-time, so a fix could be something as simple as tweaking the
smart_str chunking code; start with a fair initial size and perhaps
having it double the size on each realloc.The default values you find inside php_smart_str.h are tuned for efficient usage of the engine's allocator. They are not tuned for huge real-world usage. The attached patch should change that for var.c. - Sascha
On large arrays (Ex. $GLOBALS) this patch seems to have ~10% speed
improvement on PHP 5.
Ilia
Andi Gutmans wrote:
Still behind a bit on my email. Has anyone tested this yet? It would be
cool to commit.
Hmm, that wasn't quite the gain I was hoping for. Might be time for the
contest after all (to create a compatible way of serializing).
Andi
At 04:17 PM 11/5/2004 -0500, Ilia Alshanetsky wrote:
On large arrays (Ex. $GLOBALS) this patch seems to have ~10% speed
improvement on PHP 5.Ilia
Andi Gutmans wrote:
Still behind a bit on my email. Has anyone tested this yet? It would be
cool to commit.