|
peter pan
Poland Warsaw mazowieckie
-
This may be corrected in the future version and it's kind of hard to explain but here it is:
When I create link to i.e. rpg item or when I add i.e. issue (I will go with this example) on the geeklist there is this strange behaviour:
I type something, hesitate for a fraction of second, and type the rest, i.e.:
Rebel Times [hesitate for a fraction of second] 37
Now, the fraction is big enough that the browser sends a asynchronous request to the server for a list matching "Rebel Times" which is now nearly 50 objects. Then it sends a request to the server for a list matching "Rebel Times 37" which is 1 object. The problem is they return in the wrong order because fetching 50 objects takes longer than 1 object, sooo:
Client_______________________________Server "Rebel Times" -------------------------------------> "Rebel Times 37" ---------------------------------> <---------------------------------------- Rebel Times 37 : object The 1 object is displayed for a fraction of second <---------------------------------------- Rebel Times: objects List of way too many objects
The problem is that the "suggest" controller discards current results in favor of the one that come from the server (at least it appears to be happening based on user experience), ingoring the fact that the "current" result is actually more fresh than the incoming one. So in essence: old response is treated as newer than newest one.
The obvious solution - if my understanding of the underlying problem is correct - is to send an increasing number with each request (or timeStamp) which should be then sent back with the results from the server. In this way the controller could compare numbers/timeStamps and discard current results only if the incoming data is a newer request.
-
|
|
|