Slow writeing to database is creating problems

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
icarpenter
Forum Commoner
Posts: 84
Joined: Mon Mar 07, 2005 8:12 am
Location: Kent, England

Slow writeing to database is creating problems

Post by icarpenter »

I have user registration page wich has approx 20 fields ie: firstname, lastnam...etc etc.

When this information is submitted to process page and then to the database, there is a pause of approx 4 to 6 seconds before a confirmation from the process page is displayed.
I think some of this delay may be related to the mail() function which sends and email confirmation of the registration details. as the process seems much quicker when mail() is commented out!

This leaves me with the problem of the user looking at the submit page for up to 6 seconds and as result an impatient user can resubmit more than on form of the same information as there is no indication that the process is underway...

The speed of this does vary on my test machine the proccess is very quick and is not an issue however on the hosted server this is takes a little longer...

Has anyone got any suggestions on how this proccess might be structured.

Thanks Ian...
Last edited by icarpenter on Fri Jun 10, 2005 3:40 am, edited 1 time in total.
malcolmboston
DevNet Resident
Posts: 1826
Joined: Tue Nov 18, 2003 1:09 pm
Location: Middlesbrough, UK

Post by malcolmboston »

post your code, ive done pretty much exactly what you've mentioned with no delay

it may actually have something to do with usage of the server you are on, basically other sites could be using alot of the CPU cycle, but it is better to eliminate your own coding from the equation
User avatar
patrikG
DevNet Master
Posts: 4235
Joined: Thu Aug 15, 2002 5:53 am
Location: Sussex, UK

Post by patrikG »

moved to PHP Code.
Post Reply