Results 1 to 3 of 3

Thread: Some Homepage optimizations

  1. #1
    Join Date
    Nov 2002
    Location
    Philippines
    Posts
    646

    Default Some Homepage optimizations

    While experiences may vary, I'm assuming everyone has had issues with the homepage's unreasonable load-times.

    The reason for the ridiculous load times was because the social media panel feeds were being pulled and generated on the backend before serving it to the browser. This meant that you would only see the page once everything was ready to be seen - and therefore any delay in the pulling of the data from the various social media servers would impact the page generation.

    I've optimized the page further by moving it out from the server side and just doing it via ajax (which is asynchronous) - which I believe should drastically reduce load times. But take note the CMS we're using isn't exactly barebones so it still won't be lightning quick - but at least we know that whatever delay we have is because of the CMS backend, and not necessarily the extra "fluff" I included.

    Since the new implementation is now done via JS (and done asynchronously), I've also taken the liberty of adding an automatic refresh on the feeds. This means the feeds will update themselves in specific intervals (Facebook every 10 mins, Twitter every 5, Flickr every hour).

    Also, I've changed the way the member tweets are presented; they'll only show the MOST recent tweet by individual members. As a result, if the most recent tweets pulled are from a single member who decided to post multiple times (and we have a lot of tweet-happy members), it'll only display the most recent one, skip the rest, and proceed to the next member's [most recent] tweet.

    Due to privacy issues, I [still] have to hide tweets from members who set their accounts to private, even if I techincally can expose their tweets alongside everyone else's. Kind of a pain in the ass to accomodate since it requires more code than usual - plus it'll require to pull more tweets than usual (which means a larger file to pull and impact data load times), but you gotta do what you gotta do.

  2. #2
    Join Date
    Nov 2002
    Location
    Land Downunder
    Posts
    11,595

    Default Re: Some Homepage optimizations

    Yeah... I sent a tweet with mentions to some BP members (mutually following)... surprised to see my tweet posted as they are private...... hehehe. Next time DM na lang hehehe
    I am not who you think I am because I do not pretend to be somebody.
    Do not assume that I know everything because I am a nobody - Alexander


  3. #3
    Join Date
    Nov 2002
    Location
    Philippines
    Posts
    646

    Default Re: Some Homepage optimizations

    Oops, sorry bout that. I thought the API only returned public posts when using the mention query.

    Anyways, I corrected the issue, private accounts are now omitted as well on the mentions stream.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •