RSS Reader Killing Load Time

Discussion in 'Programming' started by timallard, Feb 26, 2008.

  1. #1
    Hello,

    I have a website where i have a RSS feed (feed2js) and other elements like a video player etc.

    The RSS feed is placed lower on the page, but still holds the video player from loading until the RSS reader fully pulls its content.

    The load time isnt dramatic,..its about 4 seconds,..but the video player is the first thing you see so its important it loads instantly like it normally would without the RSS reader on the page...

    Is there a work around?
    Its using PHP and JS.

    Any help would be greatly appreciated.

    Thanks,
    -Tim :confused:
     
    timallard, Feb 26, 2008 IP
  2. able

    able Peon

    Messages:
    44
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    2 possible solutions come to mind

    1) Get rid of the js rss, get a simple php reader that outputs plain html

    2) Use jquery or other js, to load the js rss reader, when the page has completed
     
    able, Feb 26, 2008 IP
  3. redwall_hp

    redwall_hp Peon

    Messages:
    9
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I agree with able's solution. If you go the PHP route, I recommend SimplePie (simplepie.org). It's a free and easy to implement PHP RSS parser. It's pretty much the only one in active development too...
     
    redwall_hp, Feb 27, 2008 IP
  4. AstarothSolutions

    AstarothSolutions Peon

    Messages:
    2,680
    Likes Received:
    77
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Ok so you dont have a feed on the page but are consuming a feed I take it?

    Why not cache the feed? Have a cron job or equiv pick the feed up every X minutes/ hours and save the web server having to do a current thread lookup thus holding up the whole page. Alternatively if PHP allows for multithreading (assume it does), set the reader up on a different thread, present the rest of the page to the user and have ajax check back against the other thread to confirm when the reader is complete (and show the content once it is obviously)
     
    AstarothSolutions, Feb 27, 2008 IP
  5. timallard

    timallard Well-Known Member

    Messages:
    1,634
    Likes Received:
    62
    Best Answers:
    0
    Trophy Points:
    158
    #5
    Thanks everyone. great info here.
     
    timallard, Mar 5, 2008 IP