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:
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.
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. Has anybody faced such issues where the first AJAX request goes through fast, but all subsequent ones take time?