This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
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 OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA 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
Author

[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?

TIA.
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
Marshal

Joined: Mar 22, 2005
Posts: 41631
    
  55
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
author
Rancher

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

Eric
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: [Ajax] response time is very-very slow