Unserialize()
| From: | shruti | Date: | Tue, 22 Mar 2005 15:51:30 +0000 |
| Subject: | Unserialize() | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-15541@lists.php.net to get a copy of this message | ||
Hello all,
I have an issue with unserializing big objects. My object when serialized to a file creates a file
as big as 29 Megs. And when i m trying to unserialize the object, it takes forever somewhere around
33-36 secs(sometimes even more).
My object has one member variable which is a reference to an array.
I was using PHP5.0.2 I read about some bugfixes with unserialize. So I grabbed the most latest
snapshot from CVS 5.0.4 RC4. (Dint help me though)
Alternately I also tried
$s = "<? php $var = " . var_export(myobj.arr,true) . " ?>";
and then writing this string to a cache file (Creates a file as big as 29Megs).
Next time when the cache is found I say..require($cachefile);
and then use the $var to recreate myobj.
This also proved out to be too slow for me. Any comments on how should I handle this issue.
If you want i can send the code to you. Could you please help me on this?
Waiting for a reply eagerly,
Thanks a lot
Regards,
--shruti.
---------------------------------
Do you Yahoo!?
Yahoo! Small Business - Try our new resources site!