I’m currently working to turn a web app made with a homemade interface library into a standard ExtJS MVC application. Everything works fine except Ajax requests which suffer higher latencies on page startup. Indeed, although the file I call is not really different than before, sometimes I have to wait from 3 to 6 seconds more than before to get the response back.
To reduce the scope of my investigations, I have changed the code to return static data (a simple json string), eliminating the option of a database issue. Moreover, I have noticed that using “Replay XHR” in Google Chrome (“Network” panel) I get the response back almost instantaneously.
I guess it’s hard to help on this topic but hope someone has already encountered this kind of issue and could share some advices on where to investigate.
Observations
-
requests sorted by latency (the gap is about 500ms) :

-
requests sorted by start time :

I have tried loading one store after another. Doing so, I have reduced the load time of all stores to about half a second. I don’t know if this problem occurs on every browsers, I will check this one day. Here is the patch (don’t forget to remove
autoLoad:trueto all stores):