IIRC, we used to support that back in ~2000s, but it got removed based on
the lack of usage and poor implementation.

Connection pooling could be a good usage of this if we manage to get this
working again.

[]s,

On Thu, Dec 11, 2014 at 1:46 PM, Marc Bennewitz <dev@mabe.berlin> wrote:

>
> Am 10.12.2014 um 09:53 schrieb Stanislav Malyshev:
>
>> Hi!
>>
>>  Why?
>>>
>>> There is a reference counter, which should be increased on put a value
>>> into persistence and on removing a value from persistence decrease it.
>>> So the GC could handle unreferenced zvals.
>>>
>> Because memory which is allocated by the engine is freed at the end of
>> the request. You could copy the memory values but by then unless your
>> zvals are pretty simple you'll be pretty close to what the serializer
>> does, so no really big win there. The only advantage would be that when
>> you use it, if you're really careful, then you can use the data without
>> reallocating memory and freeing it. But it's not just putting a
>> flag/refcount on it, it requires some copying before that and some
>> careful setting of the refcounts too. So in theory, it can be done at
>> least for scalars and arrays (objects would be a problem since they need
>> class, and what if the class changed?) but it's not trivial.
>>
>>  Thanks for the explanation!
> I'll experiment with it for scalars as extension.
>
> Marc
>
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
Guilherme Blanco
MSN: guilhermebla...@hotmail.com
GTalk: guilhermeblanco
Toronto - ON/Canada

Reply via email to