Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:97338 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 48671 invoked from network); 8 Dec 2016 05:10:19 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 8 Dec 2016 05:10:19 -0000 Authentication-Results: pb1.pair.com header.from=yohgaki@ohgaki.net; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=yohgaki@ohgaki.net; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain ohgaki.net designates 180.42.98.130 as permitted sender) X-PHP-List-Original-Sender: yohgaki@ohgaki.net X-Host-Fingerprint: 180.42.98.130 ns1.es-i.jp Received: from [180.42.98.130] ([180.42.98.130:41226] helo=es-i.jp) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 75/14-11772-53BE8485 for ; Thu, 08 Dec 2016 00:10:15 -0500 Received: (qmail 59262 invoked by uid 89); 8 Dec 2016 05:10:09 -0000 Received: from unknown (HELO mail-wj0-f172.google.com) (yohgaki@ohgaki.net@209.85.210.172) by 0 with ESMTPA; 8 Dec 2016 05:10:09 -0000 Received: by mail-wj0-f172.google.com with SMTP id xy5so379045650wjc.0 for ; Wed, 07 Dec 2016 21:10:09 -0800 (PST) X-Gm-Message-State: AKaTC01A07DC3Us+AcRCNTBHBt+3gIMfoppIR2A7nEAP+HLscep8IW+2EKfUuJNx3QMR1eDJCo8cj2EZ74CBZw== X-Received: by 10.194.174.229 with SMTP id bv5mr62624028wjc.21.1481173803012; Wed, 07 Dec 2016 21:10:03 -0800 (PST) MIME-Version: 1.0 Received: by 10.194.38.7 with HTTP; Wed, 7 Dec 2016 21:09:22 -0800 (PST) In-Reply-To: References: <70.0A.11772.8B1E7485@pb1.pair.com> Date: Thu, 8 Dec 2016 14:09:22 +0900 X-Gmail-Original-Message-ID: Message-ID: To: Bob Weinand Cc: Tony Marston , "internals@lists.php.net" Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] [RFC][VOTE] User defined session serializer From: yohgaki@ohgaki.net (Yasuo Ohgaki) On Thu, Dec 8, 2016 at 10:02 AM, Yasuo Ohgaki wrote: > Please note that users cannot write clean/efficient user defined > serializer without this RFC. It may be better to explain real working code. Since I added "php_serialize" to recent PHP, user defined serialization with current API became a lot simpler, but you'll see this hack is inefficient. i.e. There are needless serializations as well as needless handler calls. https://gist.github.com/yohgaki/432579e535ae97856a1227e4d47d0e2e Efficient and clean code by this RFC is written as comment below. In addition, it works both OO and procedural API. Note: Since 7.0, updateTimeStamp feature does not work with OO API. This will result in a lot slower session performance for session database over network. i.e. Memcached/Redis/session_pgsql/etc. This is a bug though. I'll fix this by new OO API. http://lxr.php.net/xref/PHP-7.1/ext/session/tests/bug71162.phpt Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net