From: Matt J. <mj...@um...> - 2002-10-04 17:05:56
|
On 10/4/02 12:54 PM, "Jared" <xe...@si...> wrote: > On Friday, October 4, 2002, at 11:44 AM, Chad wrote: > >> Ok, so I want to talk about Sessions.... how are we going to speed up >> and lighten processor load for 0.6 PHP iCalendar? :-) > > Well, I think if we write all the main variables to a session along > with the filemtime() of the last parsed file, it can check each page > load whether the file is different and if not, use the session data. If > it is different, parse the file again and write it to the session. I > don't think it's too complicated, really. We just need $master_array, > $getdate, $cal, and $cal_modDate. I don't know if we need anything else > (at least, I can't think of it off the top of my head). > > -Jared > In that case, I would store all the variables inside on array and run the "serialize()" function and save the serialized data to a file with the same file date and time as the original ical file. Then it would be easy to check the date of the "compiled" code to the ical file. If the same, just "unseralize()" the array back into php, and no processing is required. This way if you have 10 new users in a second, it won't kill the CPU. Cuz a new session will be created per user per browser. 10 new users with a session will process the original ical file 10 times. ;-) ========================== Matt Jarjoura ========================== | UMBC | Phi-Delta 313 | ========================== |