Importing slow data from another site.

Discussion in 'PHP' started by sm9ai, May 6, 2008.

  1. #1
    Hi,

    I have two sites under my control.

    One site is the main site and the other one is a database catalogue that provides data to external sources via xml.

    I want to pull data from the xml to the main site. However the database catalogue is really slow.

    When I pull this data back to the main site doesn't display the site until all the date is loaded. Effectively slowing the main site to the speed of the second site.

    Is there anyway to display the main site as normal, and display the imported date when it is compiled?

    e.g. the main site loads super fast with a please wait... type thing in one small corner, this is then replaced with the data when it is ready?

    Hopefully that makes sense, any help would be grateful.
     
    sm9ai, May 6, 2008 IP
  2. mwasif

    mwasif Active Member

    Messages:
    816
    Likes Received:
    23
    Best Answers:
    1
    Trophy Points:
    70
    #2
    The better solution is to optimize your application and use indexes in database.
     
    mwasif, May 6, 2008 IP
  3. french-webbie

    french-webbie Peon

    Messages:
    194
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Why not using a batch/cron script to generate the content in cached files on the main site?
     
    french-webbie, May 6, 2008 IP
  4. sm9ai

    sm9ai Active Member

    Messages:
    746
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    60
    #4
    Thanks for your replies.

    Unfortunately that is not an option.

    The application will always be slow, we are talking multi-million records that is constantly updated (and unfortunately it not something that I have written so I cannot really modify it) and it has to be live data.
     
    sm9ai, May 7, 2008 IP
  5. sm9ai

    sm9ai Active Member

    Messages:
    746
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    60
    #5
    Solved, used Ajax in the end. Works really well!
     
    sm9ai, May 13, 2008 IP