[Greasemonkey] Keeping UI responsive

Aaron Boodman zboogs at gmail.com
Wed Jun 14 09:51:06 EDT 2006


That doesn't sound right... no matter how many http requests you send,
by themselves they cannot hang the UI appreciably. The connection
limit will just make them get queued before getting sent.

So it must be either the processing that you do before or after which
causes the problem. What do you do when you get the results? Extensive
DOM or string manipulation? Have you measured how long this takes? You
may need to either optimize this code, or else queue up the work to be
done and then do it in chunks with setTimeout.

- a

On 6/14/06, Jeremy Dunck <jdunck at gmail.com> wrote:
> On 6/14/06, Philip Friedman - Auto Europe <philip at autoeurope.com> wrote:
> > Any suggestions on keeping the UI responsive when making multiple
> > GM_xmlhttpRequests?
>
> If I understand, you're doing something that sends off a large number
> of async requests.  Even though they're supposed to be async, they're
> hanging.  Is that right?
>
> If so, you might be running into the limit of concurrent HTTP pending
> requests.  Have you tried pushing your requests into a queue, then
> using setInterval to push out one request from the queue occasionally?
>
> If I didn't understand correctly, perhaps some pseudocode would help?
> _______________________________________________
> Greasemonkey mailing list
> Greasemonkey at mozdev.org
> http://mozdev.org/mailman/listinfo/greasemonkey
>


More information about the Greasemonkey mailing list