News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

AJAX Recent posts

Started by Guillelmus, November 17, 2011, 11:30:03 AM

Previous topic - Next topic

Guillelmus

How about adding some AJAX to the Recent posts view so that new messages would be loaded in real time? Propably doesn't require lots of code.

Kindred

may not require lots of code, but it would drastically increase the server usage for no real purpose...
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Biology Forums

Quotedrastically

I don't think so. It's an excellent proposal actually.

Suki

Quote from: shuban on December 24, 2011, 12:54:52 PM
Quotedrastically

I don't think so. It's an excellent proposal actually.

Yes it will be.

let's do some math:

50 active users viewing the forum index, every user will see this page for 1 minute,  the ajax call is set to refresh every 10 seconds.


1 user is going to do 6 calls every minute

50 x 6 = 300

300 hits every minute.

1 hour = 60 minutes

300 x 60 = 18 000


18 000  hits to the server per hour just for the forum index, not counting the profile, the messages and other stuff.



It's nice, indeed, but we must balance between "nice stuff"  vs "performance", in this case the nice ajax calls won't serve much if your users can't even see the page due to server under stress.

Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

live627

Quote from: shuban on December 24, 2011, 12:54:52 PM
Quotedrastically

I don't think so. It's an excellent proposal actually.
Why,, then, are shoutboxes server-killers? Gotta be careful about that refresh rate. This applies to any and all pulse-scripts.

There is a mod for this.

Biology Forums

Quote from: live627 on December 24, 2011, 09:16:40 PM
Quote from: shuban on December 24, 2011, 12:54:52 PM
Quotedrastically

I don't think so. It's an excellent proposal actually.
Why,, then, are shoutboxes server-killers? Gotta be careful about that refresh rate. This applies to any and all pulse-scripts.

There is a mod for this.

Or there could be a button to refresh, instead of auto.

Kindred

until you have 100 users online, all pressing that button at the same time....
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Guillelmus

Quote from: Suki on December 24, 2011, 01:04:33 PM
Quote from: shuban on December 24, 2011, 12:54:52 PM
Quotedrastically

I don't think so. It's an excellent proposal actually.

Yes it will be.

let's do some math:

50 active users viewing the forum index, every user will see this page for 1 minute,  the ajax call is set to refresh every 10 seconds.


1 user is going to do 6 calls every minute

50 x 6 = 300

300 hits every minute.

1 hour = 60 minutes

300 x 60 = 18 000


18 000  hits to the server per hour just for the forum index, not counting the profile, the messages and other stuff.



It's nice, indeed, but we must balance between "nice stuff"  vs "performance", in this case the nice ajax calls won't serve much if your users can't even see the page due to server under stress.
Well, it shouldn't be on the forum index page, but on a separate new posts page instead.

Suki

It doesn't matter where it is located, it will still consume resources, perhaps not as much as if it were on the index.

Actually, being in a separate page kinda defies its purpose, as the user needs to click a button or a link to get to that page, might as well just go to that page whenever I want to see the recent post.  And that page already exists:

http://www.simplemachines.org/community/index.php?action=recent



As a mod it is a great idea.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Joker™

Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

Guillelmus

#10
Quote from: Joker™ on January 03, 2012, 05:59:00 AM
Quote from: Suki on December 26, 2011, 12:26:12 PM
As a mod it is a great idea.

Quote from: live627 on December 24, 2011, 09:16:40 PM
There is a mod for this.

http://custom.simplemachines.org/mods/index.php?mod=1284
Thank you for pointing this out! Went unnoticed... I still miss the ability to see individual posts in the ajax stream, but guess this is the wrong topic for it.

Joker™

Quote from: Guillelmus on January 03, 2012, 10:23:14 AM
Thank you for pointing this out! Went unnoticed... I still miss the ability to see individual posts in the ajax stream, but guess this is the wrong topic for it.
Your most welcome.

Regarding the mod you should be posting in the mod support topic itself over here.

Marking this topic as solved and moving it to Applied or Declined Requests.
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

Advertisement: