how big is the JSON response? what if you profile a simple page with the contents of that response being run through JSON.decode? Do you see a delay there?
On Tue, Oct 27, 2009 at 8:43 AM, batman42ca <[email protected]> wrote: > > On Oct 27, 10:14 am, Samuel Thurston <[email protected]> wrote: > > > Is this specific to win2k > > No. I had someone else try it using WinXp and the same problem occurs. > > or are you seeing it on other platforms as > > > well? What if you use the naked XHR object? > > I'll give that a try. I should also point out, I've tried this on 2 > different computers, at 2 different locations. > > > 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. > > My PHP code consists of just this: > > echo json_encode($_POST); > > > Do you expereince a similar delay with other types > > I just tried it with request.HTML and the same problem exists. > > > 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. > > My test code is now dead simple. It makes a request, displays the > results. There is no other code anymore (after your response, and > before I read it, I posted my simplified test code) > > I thought I had already tried this on 2 different servers to eliminate > the server as the problem but when I actually tried this on 2 > different servers, I found one server exhibited the delay and another > did not. > > So, since Firebug shows the delay occurs after receiving the ajax > response was received and before the onComplete function is triggered, > what effect could the server have? Is there further communication with > the server after the ajax response is received before the onComplete > event can be fired? >
