Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:73211 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 93094 invoked from network); 17 Mar 2014 10:47:50 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Mar 2014 10:47:50 -0000 Authentication-Results: pb1.pair.com header.from=narf@devilix.net; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=narf@devilix.net; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain devilix.net designates 209.85.213.51 as permitted sender) X-PHP-List-Original-Sender: narf@devilix.net X-Host-Fingerprint: 209.85.213.51 mail-yh0-f51.google.com Received: from [209.85.213.51] ([209.85.213.51:40097] helo=mail-yh0-f51.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id CF/E1-17561-5D2D6235 for ; Mon, 17 Mar 2014 05:47:49 -0500 Received: by mail-yh0-f51.google.com with SMTP id f10so4982373yha.24 for ; Mon, 17 Mar 2014 03:47:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=devilix.net; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=QgaxjA20HSeaadx9hEU1U9ujGAuZ2djpe/v6UyYFtvg=; b=vEeelPYbDUABaGotAWWxkIc2VOJNiMfoKz4XLWL3nuk5yPcCn9YWfEOyhRAjzrNiS2 y7fizXi1ozLIV49BxtHXBK6J4kgVqiaiMKIOtBrYthZxYEep+PUMujJ9qyJpYQydZ3RE rXbrfSKZQiuDoSskL/hXsoBaTsrRgtVG9W7vY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=QgaxjA20HSeaadx9hEU1U9ujGAuZ2djpe/v6UyYFtvg=; b=B4AmxpSjWbQQCP620p1Ns3CKQv/bfHeOKQlBQW3m0aFO3AsaWhecZItVDXW/Ngshdu xlOA0W4++kU2QlavBr6av5H/2SUwE6DkQ4C01kqt0gDlZX1XKlqQuTbLwMvkzjw8DWCD TbEFx+Z3361s2Q4fE6chzF+5MUL/0vjFry7ApmnoV2n2evg78susq4uacp0msVWp2Tkx 9dQ5wZLf+ptKnzEWZIkD5RukZvhzqnzMiPpBDD3pwt+sLG8Xl4BonY4kIo8aQgdUvkw9 O5HoRnIjOP6E50qUaJNuLy/gOBkua7WZjxoxoQGx8zkjpFJkHTSUyq5X4Ye/AU0WwzSh V6bQ== X-Gm-Message-State: ALoCoQnEE9TEFoOg4b89OHgUxeldVQPJ8GMotmIxWdJ8n63xq7rapnCQ8gZeTJq5DBxF1UuZvhQX MIME-Version: 1.0 X-Received: by 10.236.143.148 with SMTP id l20mr2114160yhj.102.1395053266050; Mon, 17 Mar 2014 03:47:46 -0700 (PDT) Received: by 10.170.188.139 with HTTP; Mon, 17 Mar 2014 03:47:45 -0700 (PDT) In-Reply-To: References: <5324FE40.1070704@sugarcrm.com> <532603A0.8060802@sugarcrm.com> Date: Mon, 17 Mar 2014 12:47:45 +0200 Message-ID: To: Yasuo Ohgaki Cc: Stas Malyshev , "internals@lists.php.net" Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] [RFC] Revert/extend/postpone original RFC about read_only, lazy_write sessions From: narf@devilix.net (Andrey Andreev) Hi, >> > 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. >> >> 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. Cheers, Andrey.