Re: unserialize() bottle-neck
| From: | Wez Furlong | Date: | Wed, 12 Jan 2005 01:18:48 +0000 |
| Subject: | Re: unserialize() bottle-neck | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-35452@lists.php.net to get a copy of this message | ||
I found it much faster to spit out an array declaration and then use eval() to pull that data back in.
I had about 500kb of data.
--Wez.
Lukas Smith wrote:
Olivier Guilyardi wrote:Gz compression is turned off, so unserialize() eats 59,49 % of runtime. Have you ever encountered such optimization problems with serialize()/unserialize() ? I quite understand that unserializing a 150ko string (the index) into an array take some time, but how to optimize that ? Should I try to write my own (un)serializer ? What about using a binary format which would save disk space as well ? Any experiences welcome,I remember Wez once saying that he either wrote a faster serialize() or unserialize() in PHP itself .. regards Lukas