|
Posted by Electroteque on 01/05/05 14:32
On 05/01/2005, at 2:39 PM, Rasmus Lerdorf wrote:
>>
>
> You are correct, serialization tends to be the bottleneck when it
> comes to restoring large data structs. So you either avoid recreating
> the data structure and just use the data directly, or use an
> in-process mechanism like apc_store/apc_fetch which does a straight
> memcpy and doesn't need top serialize. Of course, this still doesn't
> match writing your own extension to manage your persistent data
> directly without needing to shuffle it around back and forth between
> process and shared memory.
>
Extensions to me are a black art, I am looking into this realm for a
nice way of storing persistant objects in memory. Currently I have a
method that includes the class file, serialize the class object into
a session, unserialize when needed. I can also add dynamic arguments to
it. Of course this is not useful for db objects.
[Back to original message]
|