Cheers Patrick, I do keep them to a minimum, this is my 4th after the
session variables. And I intend it to be my last.
"Patrick Latour" <[EMAIL PROTECTED]> wrote in message
001801c25a09$99e9d840$[EMAIL PROTECTED]">news:001801c25a09$99e9d840$[EMAIL PROTECTED]...
> Not yet a big specialist of PHP, but a rule that apply to nearly all
> side scripting languages, use global variables as less as you can.
> They simplify your programer's life, but on a server that is serving a lot
> of concurent sessions, it eats all the performances and ressources. It
> not explain your time problem, but it is my 2 cents before you place to
> stuff in global variables.
> Thanks and regards,
> ----- Original Message -----
> From: "M1tch" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, September 11, 2002 8:36 PM
> Subject: [PHP-DB] PreCaching Db into Variables Slows it down?!??
> > Grrrrrrr!
> > Just spent ages (well, 2hours) on a precaching system for my PHP code
> > didn't work out!
> > Hang on, I'll backtrack a bit...
> > My website is using a php engine that picks at snippets of html from the
> > database, and builds them up to form the page.
> > A typical page may use 5 of these html snippets, each at maybe 5kb in
> > I was sat thinking, looking at the debug-timer, and saw that the
> > were one of the more time consuming aspects.
> > So I said, I know, I'll save the db a bit, and at the start of the
> > read all the templates that I'll need into a global variable, and call
> > from that.
> > Simple, 5 db calls put into 1, and templates taken out of memory.
> > So why, oh why, has the time taken actually increased??? Does anyone
> > sufficient working knowledge of PHP to give me a hint at why this has
> > happened?
> > Also, am I right in thinking that as the website hits increase, the db
> > be put under increasing pressure, so it serves off better being called
> > once instead of 5 times (Even though more data is taken out of it??).
> > It's late, my eyes are blurring, and I'm annoyed. Very annoyed!
> > Regards,
> > Andy
> > --
> > PHP Database Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.385 / Virus Database: 217 - Release Date: 9/4/2002
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php