Is Quora wasting too many AJAX calls to implement its live search feature?
-
Please read full question by clicking on more before start answering :) I was looking into Quora's live search feature and found something unusual. I noticed that as soon as I put my cursor in the search box on top navigation bar, browser starts sending search ajax calls to quora servers. It also sends ajax calls too frequently for a live search feature. (Quora search calls) After noticing above stuff from Quora, I decided to compare and live search feature. Results are given below. For the same text in a question (assuming same typing speed), stackoverflow sent 6 calls to their servers while quora sent 29 ajax calls to their servers. (stackoverflow search calls) (Quora search calls) On studying further, I found that stackoverflow waits for a minimum number of characters before showing any result but that's not true in case of quora. Quora sent ajax calls as soon as I put my cursor in search box. This means that Quora send an ajax call for blank search box also. (an ajax call for blank search box) My concerns are: Can Quora better their frequency of ajax calls for search? Why should user pay for unnecessary bandwidth in this case (even if it is few bytes)? What is the use of search with insignificant number of characters in search box? Does it gives any relevant results in that case. For example: try typing "what" in search box. Had Quora search results been personal, this feature might be much more benefitial but I don't think that we need this much speed for sending ajax calls.
-
Answer:
Quora sends an AJAX call with every keystroke to suggest top content. Content in this case means Questions, Boards, Topics and People while StackOverflow is purely using AJAX for filtering questions when you attempt to add one and for that reason it is dependent to a great extent on "keywords" and that's why it doesn't send any AJAX calls before the user reaches the 3rd word in the question and it again sends the next one based on their own algorithm in a threaded approach instead of a real-time approach. A big example of something similar to Quora is Google Instant Search. You can read about the technical side of it here http://googleblog.blogspot.com/2010/09/google-instant-behind-scenes.html
Bahaa' Awartany at Quora Visit the source
Other answers
The primary reason is that users can search for topics, boards and people through the same search bar. Quora has to provide suggestions to those queries which could be a very short word. E.g. Suggest "AJAX" immediately after you type 'aj' Quora also handles acronym/aliase. Typing 'hp' brings up suggestion for Hewlett-Packard
Max Xu MengXiang
I would say, yes. The question is how high a priority it is to reduce this waste. My guess would be that when they have a chance, they will optimize it to make it so it doesn't send a request with every keystroke, but instead have it send a maximum number of requests per second (may one or two per second?). You can probably look at Google search to get an idea of what might be the best answer. With probably 10,000 times as many searches, Google can justify the developer time to get the balance between waste and latency right. For Quora, it probably is a pretty minor issue comparatively.
Rob Brown
Related Q & A:
- How to pass multiple parameters in a single Ajax function?Best solution by stackoverflow.com
- How to implement search view for list view?Best solution by Stack Overflow
- How many do species of birds live in the U.K?Best solution by Yahoo! Answers
- How many people here live in Jerusalem?Best solution by wiki.answers.com
- My webcam suddenly not working on Windows Live Messenger video calls?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.