This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Mozilla XML > September 2005 > XMLHttpRequest take 100% cpu during sync call





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author XMLHttpRequest take 100% cpu during sync call
Mcginkel

2005-08-10, 8:54 pm

When I use the XMLHttpRequest to get data from a server synchroniously.
Firefox will use 100% cpu waiting for the request to finish.

This is a problem as the server and client machine are the same. The
server operation cannot perform as firefor tries to use the cpu 100%
while waiting..



I checked the code and found in nsXMLHttpRequest.cpp line 1532:

// If we're synchronous, spin an event loop here and wait
if (!(mState & XML_HTTP_REQUEST_ASYNC)) {
while (mState & XML_HTTP_REQUEST_SYNCLOOPING) {
modalEventQueue->ProcessPendingEvents();
}

mEventQService->PopThreadEventQueue(modalEventQueue);
}

This looks like a loop, but should this take 100% cpu ?
Is there something that can be done about this ? (apart from going to
async...) ?

regards,

Kees

Heikki Toivonen

2005-08-11, 11:24 pm

Mcginkel wrote:
> When I use the XMLHttpRequest to get data from a server synchroniously.
> Firefox will use 100% cpu waiting for the request to finish.


https://bugzilla.mozilla.org/show_bug.cgi?id=190313

--
Heikki Toivonen
Mcginkel

2005-08-19, 7:38 pm

I applied the patch and that solved the problem.

Mcginkel

2005-09-02, 7:29 pm

Any idea if this bug will make it in time for the beta 1.5 or final 1.5
?

Kees

Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews