Activity: Differed loading of stream

7 years 2 months ago #290205 by timstohr
Activity: Differed loading of stream was created by timstohr
Hi Kyle,
You are implementing auto update to the stream of activity: forge.joomlapolis.com/issues/5281
Now if you have this feature in there, it would be "easy" to allow caching of the stream and simply updating the parts that are auto-updating. This could work just like websockets where the server is pushing out updates to the stream in real time to the users BUT ONLY TO THE STREAMS that have changed.

The rest could simply be saved in the user browser (or cache). That would speed up activity immensely as it would load the old version from cache imediatly and then differ the loading of the new ones.

Please Log in to join the conversation.

7 years 2 months ago - 7 years 2 months ago #290239 by krileon
Replied by krileon on topic Activity: Differed loading of stream
It's just a simply HTTP request. It'll send the timestamp of the most recent activity displayed (the first one) and date diff directly in the query to leverage SQL performance. This initial query is just a COUNT with no processing done to the activity to see if there's even anything new to respond with. The interval at which it does this will be configurable in backend. It'll also have a give up time to stop requesting new entries after a period of time or after so many intervals of no new activity (undecided, but will be configurable as well). This is basically how Facebook, etc.. does it. You can see the HTTP requests they do in the browser console under the network tab; they send the most recent activity information you've displayed.

Worth noting I'm already deep into CB Activity 4.0.0 rewriting. Activity and Comment output is working again with the new APIs. Performance with both has substantially improved (new internal caching for the API). A lot of improvements still to go.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

7 years 2 months ago - 7 years 2 months ago #290257 by timstohr
Replied by timstohr on topic Activity: Differed loading of stream
Sounds awesome! Can't wait! I especially chuffed about the new caching...

Please Log in to join the conversation.

7 years 2 months ago #290270 by timstohr
Replied by timstohr on topic Activity: Differed loading of stream
Could I suggest another great improvement? The MORE button at the end of activity should be replaced with an auto-load upon scrolling thingy ie when you come within the end of the activity module (or post or profile), the next section gets automatically loaded. That would improve perceived performance a lot (especially together with the caching)

Please Log in to join the conversation.

7 years 2 months ago #290292 by krileon
Replied by krileon on topic Activity: Differed loading of stream
The auto loading of next page is already planned, but looks like I forgot to add a ticket for it.

forge.joomlapolis.com/issues/6439

It's just a screen scrolling detection behavior that'll click the more button on the users behalf when the more button is scrolled into view. This is already optimized with pagination.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.197 seconds

Facebook Twitter LinkedIn