On Tue, Dec 8, 2009 at 3:04 PM, Ken MacDonald <[email protected]> wrote:
> Ah, but stopping them is precisely what it appears you want to do. If 200
>> requests are going to go out and their responses processed, when in fact all
>> you really need is for a single (final) request to go out (i.e. all of those
>> first 199 requests and processed responses are simply wasting time), then by
>> sending just that one final request, you wouldn't need to display the
>> application is busy because it wouldn't remain busy for any obvious amount
>> of time, right?
>>
>> I'll continue to think about this, but I believe at the moment that
>> something akin to the timer I first proposed is likely a good option for
>> you.
>>
>> Derrell
>>
>> I'm working on something like this now, where if the server backlog gets
> over a certain threshold, it'll start queuing (and discarding) requests,
> saving only the last 'good one' for when things calm down. That should
> reduce lag as well as server load substantially. I had tried using a timer
> approach before even starting this thread, but javascript timers on top of
> the rest of this app. looked incredibly complex; all the samples showed how
> easy it was to get "alert('hello world')" to work, but in a real app with
> actual classes, etc. it was beyond what I wanted to tackle :-).
> Ken
>
Update: set up a counter on outstanding server requests; once they are above
a maximum value, I start queuing only the most recent request (without
sending it to the server), and discarding the previous 'pending' request.
Once I get enough returns from the server (below my 'low water' mark for
outstanding requests) I send off a server request for my current queued
request, and so on. Now, if I down-arrow through several hundred
change-selections in my list, the latency time to display my last, good
request has gone from about 30-40 seconds to under 1/2 second, which seems
like a noticeable improvement.
Ken
------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel