On Oct 27, 7:58 am, batman42ca <[email protected]> wrote: > I'm having an odd error and I don't know where to look to debug it. > > I'm using Firefox 3.5.3 (problem exists with IE6 as well), with > Firebug 1.4.3 and mootools 1.2.4 on Win2k.
Is this specific to win2k or are you seeing it on other platforms as well? What if you use the naked XHR object? > > I send a Json Ajax request (via POST) and get a response within about > 200ms (no problem). Then sometimes (not always) there is a delay (big > problem) of a few seconds, then the onComplete function of my Json > request fires and runs for about 95ms (no problem). > > Using the Firebug profiler, I can see that the Json request response > is fast, and the profiler shows that the onComplete code runs fast. I > can't see what is causing the delay between receiving the Json Ajax > request and the firing of onComplete. The main thing that has to happen between receipt of the request and onComplete is converting the JSON to actual object code. If there is some problem in your JSON typing or syntax it might cause a significant delay. Do you expereince a similar delay with other types of request? (html/xml?) perhaps try validating your json http://www.jsonlint.com/ The only other thing I might recommend is that you look at any other loops or timeouts that may be running during the request cycle. also, If you are butting up against your system's RAM capacity (storing large hashes, many large images, or complex objects) you may be hitting the pagefile which could add a serious delay to things.
