Re: Re: unserialize() bottle-neck

From: Date: Wed, 12 Jan 2005 17:29:55 +0000
Subject: Re: Re: unserialize() bottle-neck
References: 1 2 3  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-35468@lists.php.net to get a copy of this message
On Tue, 11 Jan 2005 20:18:48 -0500, Wez Furlong <wez@thebrainroom.com> wrote: > I found it much faster to spit out an array declaration and then use > eval() to pull that data back in. Or you could use var_dump() and an include. Along with a code cache, this would speed things up considerably. > > 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 > -- Justin Patrin

« previous php.pear.dev (#35468) next »