quill18 / ld23-tiny-world

8 stars 5 forks source link

Interface: Notification AJAX reload timer tweak #65

Open quill18 opened 12 years ago

quill18 commented 12 years ago

To prevent idle sessions from hammering the server too hard, either:

1) there should be a limit to the number of times the notification icon is reloaded 2) the time between notification icon updates should grow over time if you sit on the same page. (i.e. after every check the time between checks should increase by 5 seconds).

It currently checks every 30 seconds forever. Note that if solution 2 is employed, we could reduce the base time to 10 seconds or something, so people actively interacting with the site will get more responsive notifications and people not active on the site (or just checking periodically) won't hurt it so much.

InfernoZeus commented 12 years ago

If the player isn't aware that the time between updates increases, he might stay on the same page (such as the games list) expecting it to be checked regularly. Even though he might be checking it regularly, it would assume that he is not active. Is there no way to be notified when the player actually views the page? (My knowledge of JS isn't good enough to know.)