First AJAX request goes through fast; subsequent ones very slow.
Below is my UI. Apologies for blurring some parts out.
I have a dropdown, a checkbox, a grid, and couple of buttons. The grid's data gets refreshed everytime the user selects a value in the dropdown. The checkbox for opting out of email reminders directly fires an AJAX request (via my custom ExtJS class).
Here's the problem I'm facing:
I debugged to ensure that it is not a server-based problem. It is something to do with my AJAX request. The fireEvent method belongs to Ext.util.Observable.
- When I load up this page first time, and I test the dropdown, changing it rapidly to test it, the grid refreshes within 1-2 seconds, reflecting the response from the AJAX call.
- When I check/uncheck the checkbox the first time, my AJAX request fires and returns a response within 1-2 seconds.
- But after I've performed step 2 once (only once!!), any subsequent AJAX requests from the dropdown or from the checkbox take around 38-40 seconds.
Has anybody faced such issues where the first AJAX request goes through fast, but all subsequent ones take time?
Ext JS Premium Member
I haven't noticed any such issue and my app sends many ajax requests repeatedly. Can you post the exact request posted both the first and second times?
I am POSTing data with my AJAX request. If they are multiple GET requests, each request works fine. But if the request is a POST, the first request works fine, but subsequent ones take a long time.
I know you already said this issue isn't server based - but if this were happening to me that is where I would be looking for the problem rather than in the EXTJS framework.
You could always run a test by using JQuery and the $.Ajax() function within that framework to check if the same issue exists. This would at least help diagnose where the issue lies.
Tags for this Thread