Re: [PHP] Session Vars and Performance

2005-02-18 Thread Greg Donald
On Fri, 18 Feb 2005 08:56:59 +0100, Marek Kilimajer <[EMAIL PROTECTED]> wrote: > The code misses one important thing - row locking. For concurent > requests, sess_open must block until the first request does > sess_close(). So you need to use InnoDB's row locking or > application-level GET_LOCK() a

Re: [PHP] Session Vars and Performance

2005-02-18 Thread Marek Kilimajer
Greg Donald wrote: On Wed, 16 Feb 2005 09:36:26 -0800 (PST), Richard Lynch <[EMAIL PROTECTED]> wrote: It's literally an hour's work to alter the code to use MySQL to store the sessions instead of the hard drive. Not really, maybe 5 minutes.. here's the code: The code misses one important thing -

Re: [PHP] Session Vars and Performance

2005-02-17 Thread Richard Lynch
[EMAIL PROTECTED] wrote: > On 16 Feb 2005 Richard Lynch wrote: > >> Use the exact same session stuff you have now and just dump the >> serialized data into SQL using the 5 functions for session handling. > > Oh, OK, that's what you meant about the 5 functions. I am not sure of > the advantage to t

Re: [PHP] Session Vars and Performance

2005-02-16 Thread trlists
On 16 Feb 2005 Richard Lynch wrote: > Use the exact same session stuff you have now and just dump the > serialized data into SQL using the 5 functions for session handling. Oh, OK, that's what you meant about the 5 functions. I am not sure of the advantage to that, actually something I've alwa

Re: [PHP] Session Vars and Performance

2005-02-16 Thread Greg Donald
On Wed, 16 Feb 2005 09:36:26 -0800 (PST), Richard Lynch <[EMAIL PROTECTED]> wrote: > It's literally an hour's work to alter the code to use MySQL to store the > sessions instead of the hard drive. Not really, maybe 5 minutes.. here's the code: Make the table in your database: CREATE TABLE `sess

Re: [PHP] Session Vars and Performance

2005-02-16 Thread Richard Lynch
[EMAIL PROTECTED] wrote: > On 15 Feb 2005 Richard Lynch wrote: > >> Throw an ab (Apache Benchmark) test at it and find out. >> >> Don't just guess or sit there wondering. >> >> You could run test in about the time it took to compose this email -- > > Perhaps if you are already familiar with ab, whi

Re: [PHP] Session Vars and Performance

2005-02-15 Thread trlists
On 15 Feb 2005 Greg Donald wrote: > > If you have to choose between a meaningful variable name and performance > > considerations, buy more hardware! :-) > > > > The cost you'll save in the long run for code maintenance will make it > > worth it. > > Comments in the code make using short session

Re: [PHP] Session Vars and Performance

2005-02-15 Thread trlists
On 15 Feb 2005 Richard Lynch wrote: > Throw an ab (Apache Benchmark) test at it and find out. > > Don't just guess or sit there wondering. > > You could run test in about the time it took to compose this email -- Perhaps if you are already familiar with ab, which I'm not ... and if the server

Re: [PHP] Session Vars and Performance

2005-02-15 Thread Greg Donald
On Tue, 15 Feb 2005 13:01:45 -0800 (PST), Richard Lynch <[EMAIL PROTECTED]> wrote: > If you have to choose between a meaningful variable name and performance > considerations, buy more hardware! :-) > > The cost you'll save in the long run for code maintenance will make it > worth it. Comments i

Re: [PHP] Session Vars and Performance

2005-02-15 Thread Richard Lynch
Greg Donald wrote: > On Mon, 14 Feb 2005 16:03:10 -0500, [EMAIL PROTECTED] > <[EMAIL PROTECTED]> wrote: >> I have a multi-page form which I build up and store in session >> variables. The data saved includes all an internal list of items on >> the form (derived from a database table), all the form

Re: [PHP] Session Vars and Performance

2005-02-14 Thread Greg Donald
On Mon, 14 Feb 2005 16:03:10 -0500, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I have a multi-page form which I build up and store in session > variables. The data saved includes all an internal list of items on > the form (derived from a database table), all the form field specs > (derived fr

Re: [PHP] Session Vars and Performance

2005-02-14 Thread Marek Kilimajer
[EMAIL PROTECTED] wrote: I have a multi-page form which I build up and store in session variables. The data saved includes all an internal list of items on the form (derived from a database table), all the form field specs (derived from the internal item list), the data for the fields (from an