On 10 August 2013 10:54, Yasuo Ohgaki <yohg...@ohgaki.net> wrote: > Hi Leigh, > > On Sat, Aug 10, 2013 at 6:48 PM, Leigh <lei...@gmail.com> wrote: > >> What is the performance difference if you just touch the files instead >> of writing them? (i.e. update mtime) > > > It will be faster for sure for files and database/network > based session storage, but I didn't took benchmark. > > I can make default handlers not to purge data, but > 3rd party save handlers will be affected. Since there > is no API for it. Should I create API? > > I think custom handlers should still function as they always did, you should not track whether the session changed or not for them, they can easily track that themselves.
For the built-in file based handler, do you think it would be a valid compromise to update the mtime of session files instead of not writing to them at all? This way you do not break BC, and maybe get a performance increase too. (and can be on by default) Disabling writes altogether (even optionally) with documented hard to debug unexpected side effects isn't a good thing in my opinion.