Re: $_SESSION v. Cookies

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---- Scott Campbell <stumblefly@xxxxxxxxx> wrote: 
> Dear PHP List,
> 
>     PHP 5, Apache2, MySQL 5, running on Ubuntu, viewing & deving with
> FireFox and Konqueror (Linux).
> 
>     I am building a site with multiple tools and want to pass variables
> throughout them all.  Before, I was passing variables using <hidden> HTML
> Form tags, but the site has grown too large for this tactic, so I went to
> using $_SESSION.  However, when I started using $_SESSION, my site loads 3-5
> times slower then before.  A page that queried MySQL and built itself in 3-5
> seconds was now taking 15-20.  While more has changed then just $_SESSION,
> it is really the only significant difference.
> 
>     Is $_SESSION slowing down my site?  Is there a faster alternative to
> global variables then using $_SESSION?  Are using regular cookies faster?
> 
>     Any help is appreciated.
> 
>     Thanks,
>               Scott

Did you add any includes and are they include or include_once or require VS. require_once?

I found stress tests that show that an include is faster then an include_once and so removing the _once from includes and requires will speed up your site.

HTH,
Wolf

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux