Forum Moderators: coopster

Message Too Old, No Replies

My PHP site takes 10 secs to load the first page

then the rest of pages go very fast

         

guarriman

11:22 am on Feb 29, 2008 (gmt 0)

10+ Year Member



Hi.

Working with PHP5, I'm suffering an odd issue with the load of my website, which is an application allowing users to register and to post question in a kind of forum/bboard.

It's made with some PHP classes I created (they write/read to/from mySQL tables), and uses Smarty.

But the first time one user access any webpage, it takes 5-10 seconds to load. Then the rest of pages visited by the same user go really fast, so I'm wondering what's wrong with my PHP app.

Do you have similar experiences? I'm considering:

- Smarty takes some seconds to compile
- App takes some second to handle session variables (I use a lot of them)

Any suggestion is welcome. Thank you very much,
--mark

jatar_k

2:24 pm on Feb 29, 2008 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



take a look at what happens on that first load that is skipped later

possibilities

login
session/cookie creation
number of db queries
loading things into cache

not sure