-
Notifications
You must be signed in to change notification settings - Fork 38
Description
Perhaps this is not an issue (I am not sure if this is normal for such an application), but...
If you perform a relatively long scroll (e.g. holding down page-down or dragging a long distance) you can generate a rather large number of unnecessary requests. For example:
- If I scroll from page 500 to 583 by holding page-down, I generate 969 requests - though I never actually see any pages except the last.
- If I start from the beginning and drag the scrollbar to page 411 (with pretty good accuracy), I generate 871 requests.
I am running Google Chrome on Windows XP on relatively new hardware on a relative fast internet connection and it performed relatively well, but it may be problematic for others to have hundreds (sometimes thousands) of requests in a matter of a couple seconds.
A possible fix would be to not make the AJAX call immediately, but instead set a timer which will check to see if the page is still in the view and only then make the AJAX call. The actual interval can be relatively small and remain unnoticeable by the user (think 1 / # of page downs per millisecond). In fact, it may speed up performance as the user wouldn't have to handle hundreds simultaneous connections.