|
Rank: Member Groups: Member
Joined: 6/18/2007 Posts: 21
|
So, I wonder if you could give a bit more info as to what the DiscardAll option does in CallbackQueueMode
Does it basically turn off the callback control and in what type of situation would this be necessary?
Thanks
-Raine
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi Raine,
No. It doesn't turn off the callback. Consider the following sequence:
1. A callback is triggered; 2. The callback initiates the AJAX call to the server; 3. While it's waiting for the server's response, a second callback is triggered;
At this point, if DiscardAll is used, then the second callback request will be discarded, otherwise it will be queued up, and when the first call is finished, the second call would be sent to the server.
So when DiscardAll is set, the queue buffer is 0. The difference between DiscardAll and KeepLast is KeepLast has a queue buffer of 1.
Thanks
|
|
Rank: Member Groups: Member
Joined: 6/18/2007 Posts: 21
|
Ok.. so right now I'm using KeepAll for the following scenario: Google Map that allows a user to drag the map to pan and view Geocaches. http://www.geocaching.com/seek/gmnearest.aspx?lat=47.6715&lon=-122.3413Just noticed this option so now I'm moving to KeepLast as some people don't wait for the caches to load and we've seen queuing of calls. Would KeepLast be a better option for it to cancel prior requests when users pan the map fast? -Raine
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Theoretically. :) Pratically there really isn't too much of a notable difference from end user point of view.
|
|
Rank: Member Groups: Member
Joined: 6/18/2007 Posts: 21
|
well if 10 things queue up then once they stop moving the map they have to wait for all 10 queries to finish updating the map. with the KeepLast it seems to just finish last move only.
-Raine
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Yes. There is a huge difference between KeepAll and the other two. But there aren't that much of difference between KeepLast and DiscardAll. Sorry for the confusion.
|
|
Rank: Member Groups: Member
Joined: 6/18/2007 Posts: 21
|
Ok, thanks for the help.
-Raine
|
|