Jump to content

My PHP site takes 10 secs to load the first page


guarriman

Recommended Posts

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

Link to comment
Share on other sites

A request for any one web page should only cause the code and data necessary for that one web page to be parsed/executed/loaded/or created. If you have somehow done this so that all code is loaded and parsed when any page is requested, rethink what you have done.

 

The only way anyone in a forum can specifically help you is if you provide specific details. So far the information you have provided is fairly vague and won't get you anything but guesses as to what the problem is.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.