Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:73254 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 93772 invoked from network); 18 Mar 2014 00:51:41 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Mar 2014 00:51:41 -0000 Authentication-Results: pb1.pair.com smtp.mail=yohgaki@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=yohgaki@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.215.53 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.215.53 mail-la0-f53.google.com Received: from [209.85.215.53] ([209.85.215.53:61311] helo=mail-la0-f53.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A3/66-17561-C9897235 for ; Mon, 17 Mar 2014 19:51:40 -0500 Received: by mail-la0-f53.google.com with SMTP id b8so4289119lan.12 for ; Mon, 17 Mar 2014 17:51:37 -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=gvFTjwUJ0DQqc6GUnbPPF/udUYjCc7GxQUS9iQMZP68=; b=iFHUElfBxvAwsMSwKyj4PW0Jplccvv5LJMYVkB9VxPe1yAUO15OFlEl81yoZ3iLf89 Kjfr1spGu+I+doFvjVoYSnVonMydPMHylvRF1ydwJZwxluw8Gxek0+Hw7KD5y68Pxbz6 IsjBsZs0mGbucO5xRDON6Q/etgxd0P4an9/Um9iIfefOybtcWD+YuL3g2AyqPgzSPViy Cc6M/JSD1R81sWf8+j81yjCVltoOFVrRc8SfxIgp35fyOgEbOxEPF9sx+FbSDUudOL6G SKHfl+uPKrh/9wxpB51/3OMkIA5sclTpTKAkCMvxZ95lYB8inChAwnTHLp7inG93aIfG aqXQ== X-Received: by 10.112.171.136 with SMTP id au8mr17973494lbc.0.1395103897455; Mon, 17 Mar 2014 17:51:37 -0700 (PDT) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.112.205.73 with HTTP; Mon, 17 Mar 2014 17:50:57 -0700 (PDT) In-Reply-To: References: <5324FE40.1070704@sugarcrm.com> <532603A0.8060802@sugarcrm.com> Date: Tue, 18 Mar 2014 09:50:57 +0900 X-Google-Sender-Auth: nyNQJluNwPQX6YS9125krMbXDb0 Message-ID: To: Andrey Andreev Cc: Stas Malyshev , "internals@lists.php.net" Content-Type: multipart/alternative; boundary=001a11c377a43b91c104f4d6f0db Subject: Re: [PHP-DEV] [RFC] Revert/extend/postpone original RFC about read_only, lazy_write sessions From: yohgaki@ohgaki.net (Yasuo Ohgaki) --001a11c377a43b91c104f4d6f0db Content-Type: text/plain; charset=UTF-8 Hi all, On Mon, Mar 17, 2014 at 7:47 PM, Andrey Andreev wrote: > >> > If save handler (regardless of user or C) does not implement its own > >> > update(), > >> > then update() will not be called, instead write() is called. > >> > To do that, address of the dummy function is compared. > >> > >> Ok, so why is 'lazy_write' an option at all then? I don't see a reason > >> why it shouldn't be the default and even mandatory behavior. > > > > > > I would like to make 'lazy_write' default to TRUE, since there would not > be > > 'unsafe_lock'. > > I wouldn't try to add 'unsafe_lock' anymore. It's safe to make > 'lazy_write' > > default to TRUE. > > > > 'lazy_write' needs a little memory, but it's session. Session data would > be > > small enough > > for almost all apps and memory is cheap these days. > > (Note: I've implemented 'lazy_write' by using MD5 hash at first, but > > benchmark revealed > > simple store and string compare is much faster. It's saving loaded > session > > data and > > compare to check modification with new patch.) > > > > Any objection/comment make this default to TRUE or automatically apply > > 'lazy_write'? > > I think automatically applying 'lazy_write' is good choice. > > My quesion was rather why does it need to be optional at all > (regardless of the default value)? If it is somehow handled at all > times, it becomes just a performance improvement. I don't see a reason > why performance improvements should be optional. > I agree. If nobody objects, I'll remove the option. Please send mail ASAP! > > >> >> Btw, this should probably be called updateTimestamp() instead of > >> >> update(), for userland at least. write() vs. update() can be somewhat > >> >> confusing. > >> > > >> > > >> > This could be changed. Better name is always good. > >> > >> Well, there you go - updateTimestamp() is a better name. ;) > > > > > > I thought of similar name. I choose update() since it seemed it is > matching > > name for read()/write(), but descriptive name may be better. > > > > Any comments for renaming? > > I'm all for it (naturally, since I suggested it), it could be > updateTimestamp(), updateTs(), updateTime(), etc. Anything in that > fashion would be more descriptive and less confusing. I agree this, too. I would choose "updateTimestamp". Please send mail ASAP, if anyone has comment. When is the beta due? I made PR so that RMs can merge it. I don't need git commit log. It's just a personal memo. Please feel free to merge with squash if RMs are would like to merge it now. It's good enough for beta. https://github.com/php/php-src/pull/628 Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net --001a11c377a43b91c104f4d6f0db--