Freigeben über


Ajax, behind the scene, is everything optimized?

Out of curiosity I was toying with Http Professional 5.2 and some high performance web sites which use Ajax. Incidentally, I tried Google's https://www.google.com/webhp?complete=1&hl=en. and found something interesting.

This feature is cool as it guides the users to search for particular strings (Fig. 1), by pre-fetching possible matches from the back end.

I started, HttpWatch Professional 5.2, from my IE 7.0 and captured the following screen shots. My intention was to search for a term which will show some valid results once I hit the search button. So, I thought of starting with my first name "banibrata".

Google suggest is a very good user experience. I started with "b", it gave me many suggestions (Fig 1), and my HttpWatch registered a network call to the back end (Fig 2). The call looked like: https://www.google.com/complete/search?hl=en&client=suggest&js=true&q=b&cp=1. As I went on typing "a", "n", "i", it made similar calls and I got the suggestions almost instantly. But once I typed "banib", it seemed, I had reached the end of Google suggest's wit. I kept on typing until I complete my first name : "banibrata".

Observation

HttpWatch showed, even though Google stopped suggesting me, it made the same asynchronous call to the back end for each letter I typed "banib" onwards, which no result, for these requests (Fig 3 and Fig 4).

Though from an end user's stand point this doesn't affect the performance, from the over all system perspective, it is making a network round trip for each letter, which doesn't make sense here.

 

image

Fig. 1

 

 

image

Fig. 2

image

Fig. 3

 

image

Fig. 4

Are these calls required?  This is just adding to network round trips, though from the end-users perspective it doesn't matter, it has a performance overhead, whatever little it may seem. The logic can be modified in such a way that once the suggestion from the back end stops, typing forward will not result a call to the back end.

Comments

  • Anonymous
    July 15, 2008
    Good Observation Bani ... Keep enlightening us with your wonderful experiments.
  • Anonymous
    July 16, 2008
    Bani, good luck w/the new blog!Looking forward to seeng perf gems you share herethanksalikl