|
Posted by Chris Thompson on 12/17/21 11:54
Hi Erwin,
Thanks for this, but if I start at question 20, and navigate backwards to
question 1, it still starts to slow down at question 5, so doesn't seem to
be the answer...
Cheers anyway,
Chris.
"Erwin Moller"
<since_humans_read_this_I_am_spammed_too_much@spamyourself.com> wrote in
message news:44d08c5e$0$4525$e4fe514c@news.xs4all.nl...
> Chris Thompson wrote:
>
>> Hi All,
>>
>> I have a private website created using HTML/PHP. Within this site, there
>> is a page that has a form (question.php), which is populated depending on
>> the question number that has been posted to it.
>>
>> When the form is submitted, the data is posted back to the same page
>> (question.php), and the code within the page saves the posted data, and
>> displays the next question, and so it goes on...
>>
>> While the page loads almost instantly for the first 15 or so questions,
>> the server response gets gradually slower, to the point where the page
>> takes about 30 secs to start loading after about 18 questions.
>>
>> I'm trying to understand what may be causing the lag... It doesn't seem
>> to be the loading of the page that's taking the time, it's the response
>> time from the server before the page starts loading that seems to
>> increase.
>>
>> The page does use MySQL tables, but all are well indexed, and as I say,
>> you can load the page about 15 times, before any noticeable delay starts
>> to happen.
>>
>> Anyone any ideas please?
>>
>> (I've put the complete site on 2 different servers - 1 on a shared
>> hosting
>> account, and 1 on completely different managed server, and the same thing
>> happens on both servers!?).
>>
>> Thanks,
>> Chris.
>
> Hi Chris,
>
> That indicates that your script has a higher workload the higher the
> questionnumber is.
> That could indicate that the script is doing more work for question number
> 20 than for question number 1.
>
> Do you only perform the quesries needed?
> Are you maybe 'counting' by doing subsequent databasequeries untill you
> pulled the 'right' question from the table(s)?
>
> Regards,
> Erwin Moller
Navigation:
[Reply to this message]
|