Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:73184 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 86353 invoked from network); 16 Mar 2014 00:58:36 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Mar 2014 00:58:36 -0000 Authentication-Results: pb1.pair.com header.from=yohgaki@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=yohgaki@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.215.46 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.215.46 mail-la0-f46.google.com Received: from [209.85.215.46] ([209.85.215.46:49100] helo=mail-la0-f46.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A4/70-16948-A37F4235 for ; Sat, 15 Mar 2014 19:58:35 -0500 Received: by mail-la0-f46.google.com with SMTP id hr17so2760292lab.33 for ; Sat, 15 Mar 2014 17:58:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=BOoFhNGQO0RyvcUaHG4hx4W42IQuiQMPTpQ7IXo65UQ=; b=PmkbhdvmI1E+DPZ2l/2LP6MwSaPDwYMLaXc3noDlxrDqTI0Tacj2YgKN5ZoGava2tv Y1X/qIp8fZsgaI9hQO32W2Jz7+N52o7CJXt4r2uVS8URSvRjTkFN988XolbupIrM+eVj Mc3Pf+3CtKwahM/PU0489Utjqhopb+CA9g1eQMxeEhBvaC9QMMcD8QJS0KdaoQhDDaY9 H/v9ehyNgCHbwMWgMy9Y4vudyOQew75/oeXGrT7YLELbfhMcG/wwrRxH0sHwyoOnhOuq tax1ZCdUyH3HXH7EFvXccSt1mh/1TP3JoqUPYNVPVLbiO9kGucxg6NIuTzi6glEI3A6R jQWw== X-Received: by 10.112.154.202 with SMTP id vq10mr10715488lbb.3.1394931512221; Sat, 15 Mar 2014 17:58:32 -0700 (PDT) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.112.205.73 with HTTP; Sat, 15 Mar 2014 17:57:51 -0700 (PDT) In-Reply-To: References: Date: Sun, 16 Mar 2014 09:57:51 +0900 X-Google-Sender-Auth: VpjKRwY4JLgZPWnfwp-AwjnBzXQ Message-ID: To: Andrey Andreev Cc: Patrick Schaaf , internals , Pierre Joye Content-Type: multipart/alternative; boundary=089e0112bf4445a86b04f4aecda1 Subject: Re: [PHP-DEV] Re: Revert session_serializer_name(), session_gc() From: yohgaki@ohgaki.net (Yasuo Ohgaki) --089e0112bf4445a86b04f4aecda1 Content-Type: text/plain; charset=UTF-8 Hi Andrey, On Sun, Mar 16, 2014 at 9:45 AM, Yasuo Ohgaki wrote: > On Sun, Mar 16, 2014 at 3:33 AM, Andrey Andreev wrote: > >> >> > "write short circuit" omits "write" when $_SESSION hasn't change. >> There >> >> > is >> >> > no point calling write API and writing to storage for the same data. >> >> >> >> "write short circuit" as I understand it, is an exact copy of the >> >> 'lazy_write' option. This will be addressed in the previously >> >> mentioned RFC that I'll post later today. >> > >> > >> > No. It's not. >> > >> > "lazy_write" does not lock session data while "write short circuit" >> does. >> > In other words, "lazy_write" changes session behavior, but "write short >> > circuit" does not. >> > i.e. With locked session data, "write short circuit" would not change >> how >> > session manager works. >> >> I can't stress enough how confusing and potentially unsafe that is > > > It does not make difference since many users use session_commit() > to get more concurrency already. Simple documentation would be enough to > understand what it does. > > There are freedom to shoot their own foot by themselves in any languages. > We have better performance/more complex operations/convenience in return. > One more comment for this. "write short cut" is designed to work with old(I mean existing) save handlers. Behavior does _not_ change at all. New save handlers that support new save handler API work much faster. That's it. Save handlers like memcahe/memcached updates last access time stamp by reading data. These save handler may omit writes at all when session data hasn't changed. I don't think explanation is needed why this gives us better performance. Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net --089e0112bf4445a86b04f4aecda1--