Jump to content

Slow running php program


oracle765

Recommended Posts

Hi Guys

We have had a holiday program written in php in the past by an experienced developer but we are experiencing problems now.   So I am curious to try and resolve the best approach

Here goes

1:  We query multiple APIs to return holiday results to our users

2:  This can take up to 20 seconds to return results but sometimes its much quicker depending on the volume of API returned results

3:  Other users seem to be locked out of even visiting our website if an API call is running

So initially without posting any code, I have a couple of questions which are

A:  Is there a way to maybe poll a process or allow partial results to the users browser while things run in the background ( similar to what other holiday providers seem to be doing )

B:  Is there a way to speed this up or maybe some sort of better technology to utilise

 

Many thanks professionals

Link to comment
Share on other sites

Have you done any research on how long it takes for each API to return a result?  That's the first thing I would do - determine where the drag is. 

If you find that one or more of your api's is the cause then you need to pursue with them why it takes so long.

Link to comment
Share on other sites

What he means is that if the the perceived slowness is caused by the provider's server, over which you have no control, there is nothing you can do in your code to change that. Well, I take that back. There is one thing you can do. Download the provider's database into your own in background and use your own database to do the queries.

Link to comment
Share on other sites

ok thanks Barand

 

I will look into this, as you are probably already aware they are in an ini file which sets them to active or none active for each holiday provider, and if i keep adding them it keeps getting slower

 

I will look into this ajax call to see if i can run in parallel

 

many thanks

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.