File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes HTML, CSS and JavaScript and the fly likes [Ajax] response time is very-very slow Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "[Ajax] response time is very-very slow" Watch "[Ajax] response time is very-very slow" New topic

[Ajax] response time is very-very slow

ankur rathi
Ranch Hand

Joined: Oct 11, 2004
Posts: 3830
I am using this auto complete script for displaying suggestions: auto complete.

I read some old post having same sort of issue and found it's because of server side processing, JS merely take time.

But here in my case:

I am alerting server response first and then callig this ac script. Server response is coming in reasonable time (not fast though) but suggestions are getting displayed after a huge time delay. Moreover matchingNames array has only 2-3 values at this time.

What could be the problem?

ankur rathi
Ranch Hand

Joined: Oct 11, 2004
Posts: 3830
One difference I found is:

They are NOT calling this function on any event:

And I am calling a JS function on onKeyUp event of textbox, that JS function sends Ajax request... and then in callback function, I am calling this actb() function. :roll:
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 41040
Which part (or statement) of the code takes a long (too long) time? What does the actb function do - does the delay get introduced there?

Ping & DNS - my free Android networking tools app
Eric Pascarello

Joined: Nov 08, 2001
Posts: 15376
You probbaly need to make your serverside code faster if it takes a long time.

It is sorta covered in the JavaRanch Style Guide.
subject: [Ajax] response time is very-very slow
Similar Threads
response timing issue on Windows 7
AJAX implementation is giving problem
Autocomplete List confusion
[JS] strange problem of array
Refresh chart in jsp according to MySQL database