Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

AJAX - Slow

 
Vinod Chamoli
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am trying to build one web app using AJAX. This application will connect a backend database server based on the input user has entered. I am sending data to servlet after every keystore. I am getting required results but the only problem here is its very slow.

Does any one has some information on guidelines for AJAX application.

Any help in this context is appreciated,

Vinod
 
Jeffrey Hunter
Ranch Hand
Posts: 305
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This doesn't exactly sound like an Ajax issue, rather, you need to look closely at the performance of your servlet and the data retrieval process. From what I've seen, Ajax is relatively fast and should not introduce any substantial performance issues on its own.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It can be slow depending on connection, the processing on the server and the processing on the client(browser). It is never going to react like a client application.

Ways to speed it up is to streamline the process. Questions you need to ask yourself is: Do you really need to make a request for every keystroke? Are you aborting requests when another key is typed? Do you have caching on the client?

Eric
 
Vicky Pandya
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Of course it will be slow if you hit server on every key stroke. figure out whether you really required to send request to server for each key storke.
 
Balaji Loganathan
author and deputy
Bartender
Posts: 3150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Vinod Chamoli:
Does any one has some information on guidelines for AJAX application.
Any help in this context is appreciated,

May be you can use the implementation idea behind

dissect google suggest
 
Balaji Loganathan
author and deputy
Bartender
Posts: 3150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Jeffrey Hunter:
This doesn't exactly sound like an Ajax issue, rather, you need to look closely at the performance of your servlet and the data retrieval process. From what I've seen, Ajax is relatively fast and should not introduce any substantial performance issues on its own.


Your webiste is one of pretty cool personal website that i have seen. Congrats.
 
Jeffrey Hunter
Ranch Hand
Posts: 305
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, Balaji. I'm eager to return to the Ranch after a long hiatus, especially as AJAX is apparently a very "hot" topic here and as a developer, this seems like the place to be to get a grasp on it.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic