Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:79577 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 75699 invoked from network); 11 Dec 2014 18:52:45 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Dec 2014 18:52:45 -0000 Authentication-Results: pb1.pair.com smtp.mail=guilhermeblanco@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=guilhermeblanco@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.223.171 as permitted sender) X-PHP-List-Original-Sender: guilhermeblanco@gmail.com X-Host-Fingerprint: 209.85.223.171 mail-ie0-f171.google.com Received: from [209.85.223.171] ([209.85.223.171:56255] helo=mail-ie0-f171.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F2/22-58820-CF7E9845 for ; Thu, 11 Dec 2014 13:52:44 -0500 Received: by mail-ie0-f171.google.com with SMTP id rl12so5364362iec.2 for ; Thu, 11 Dec 2014 10:52:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=0zHSOZgYEJoVyxLroXaibeMjJ9Ix3uSTdJdq9Bwh+lE=; b=c4JKSYpMP3b7BT+nIy7yPIJ3GTM9w/NgB6brwdbwJgMBelBMPy62bLkzsJ32SwZ9Vc 5zJaZGFtiuNjHRKfvqVHcQlLb/aoh5YdOwZ5ZEh/WA5aGpTBIFKl7H8ab2ejn5R9li/U 5WNIe8GlXqOU7uEFS2HfWVFxmCKIJoq0rR8q5BaM64eAbtpVUAPjBAVqBBI+q/EIoZa/ 88GJgi5pLkGgcxkuHYxkSaKk+uBZ2afxGOr/3dYI+7ZjL82lG/mAXm+tMAkDD5fn3LIu YtsRHK0jEc4kdYyhQ0UcfWw7lZE6bLxT9SxiHtUwRGtEFmoJfzA/1fJ8z+bBsVO4rED9 5ung== X-Received: by 10.107.136.146 with SMTP id s18mr11102981ioi.36.1418323961464; Thu, 11 Dec 2014 10:52:41 -0800 (PST) MIME-Version: 1.0 Received: by 10.64.238.75 with HTTP; Thu, 11 Dec 2014 10:52:21 -0800 (PST) In-Reply-To: <5489E693.1040605@mabe.berlin> References: <54874642.6080508@mabe.berlin> <54875152.3060808@mabe.berlin> <54880A15.50908@gmail.com> <5489E693.1040605@mabe.berlin> Date: Thu, 11 Dec 2014 13:52:21 -0500 Message-ID: To: Marc Bennewitz Cc: Stanislav Malyshev , Sara Golemon , PHP internals Content-Type: multipart/alternative; boundary=001a113ebe46e650550509f54749 Subject: Re: [PHP-DEV] persistent zval From: guilhermeblanco@gmail.com ("guilhermeblanco@gmail.com") --001a113ebe46e650550509f54749 Content-Type: text/plain; charset=UTF-8 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 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: guilhermeblanco@hotmail.com GTalk: guilhermeblanco Toronto - ON/Canada --001a113ebe46e650550509f54749--