Closed brolund closed 12 years ago
perhaps add a bandwidth modifier in there. If you are on a mobile device the frequence of update can approach max faster: t = min_time + max_time/(1+time_since_last_activity* log(device_modifier))
(not sure if log is what we need here, perhaps a steeper linear is better...)
1/x does decrease rather quickly (1, 0.5, 0.25, 0.125 , n=1,2,3,4), 1/x^2 even more so:
t = min_time + max_time - max_time/((1+time_since_last_activity)^2)
Maybe it is more relevant to increase the min_time for mobile devices? Or a combo?
I think for the mobile devices, and possibly all devices, not displaying all the statuses will also make a huge difference in performance.
I think the min_time should not be increased but the poll frequency shoud "fall" faster IMO
Ok, I think the polling interval is ok now, so I'll close this. Scream if you disagree.
Depending on the last activity of each friend, the time to wait before the next fetch should be something like
t = min_time + max_time - max_time/(1+time_since_last_activity)
meaning that for recent activity, fetch closes to min_time, and for more rare activity, fetch time approaches max_time.
min_time could be something like 5sec ("how fast can you meaningfully update your status") and max_time something like 15min.