ANNOUNCEMENTS Board announcements. Read here first
Thread Tools  
nargalzius
nargalzius's Avatar
Webmeister



Join Date: Nov 2002
Location: Philippines
Posts: 646
Some Homepage optimizations, Posted 13.06.24 #1
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.
Reply With Quote
The Following 4 Users Say Thank You to nargalzius For This Useful Post:
Alexander
Alexander's Avatar
Super Moderator


Join Date: Nov 2002
Location: Land Downunder
Posts: 11,726
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
Reply With Quote
nargalzius
nargalzius's Avatar
Webmeister



Join Date: Nov 2002
Location: Philippines
Posts: 646
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.
Reply With Quote
The Following User Says Thank You to nargalzius For This Useful Post:
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump:

All times are GMT +8. The time now is 05:21 PM.