Take the 2-minute tour ×
User Experience Stack Exchange is a question and answer site for user experience researchers and experts. It's 100% free, no registration required.

I'm deploying an instant search on my windows app. At the first implementation, when the user type a key, the search engine make a query and return the results. I thought that that wasn't too much efficient, because when the user want to search for a long word, each char makes a query, so i made the search start a bit delayed, to let the user write the full word before it starts to query and load results at the table. More efficient, less glitch when the rows are reloaded.

Its a good practice anyway? There is any convention about it? I'm seeking for a case study about how much milliseconds that delay should be, but I dont find anything. Short one, and the application will make a lot of queries when the user type slowly. Long one, and the user will perceive like the application is slow loading data.

share|improve this question
add comment

6 Answers

up vote 12 down vote accepted

Yes, this is excellent practice. It can even improve the responsiveness of your application, because doing the actual search on every key press can cause delays in itself.

I have build a component (that we're using all over the place for this and similar purposes) that basically sets two times: a minimum time to wait for more input, and a maximum time from the first input to start performing the action. The minimum timer is reset with each edit of the input, the maximum time is only reset on the triggering of the action (the search, in your case.) That way, you avoid the situation you describe. Response to this setup in the applications I have build has been very good.

I guess the ideal timings depend on the exact use case and the audience, but I'm using values in the range of 0.1s for the minimum wait, and 0.8s for the maximum.

share|improve this answer
1  
I have also used this method in the past. I chose my timings based on (guestimated) average typing speeds. So, say a user types at least 3 characters per second. Then, I'd set the lower limit to 1/3 seconds. My personal rule of thumb was to set the upper limit to 5*lower limit (i.e. 5/3 seconds) -- 5 being about the average word length. –  Brendon Feb 9 '13 at 0:22
add comment

You can make your input field adaptive to the user. That is, as the user types the first few characters you measure how fast they did it. As the user keep typing you wait until he/she slows down relative to their initial speed (which indicates a finished request or at least a pause in thought) and submit your instant search request. This will allow you to provide the best experience to both fast and slow typers.

share|improve this answer
add comment

The main problem with delays is that they are not adaptive to the environment (in this case to the user differences).

That is why I have a rule "Using time delays for controlling something is always wrong."

The most proper solution in this case is simply to make request on every keystroke.

If your requests are not fast enough - I mean guaranteed 20..50 requests per second, you have to organize the requests in asynchronous way - I mean in separate thread and refresh the proposal window when the request returns, allowing the user to type in the same time. This way, the delay will be introduced automatically and will depend on environment, not on predefined constants.

One common trick in such situation is to request only several first matches of the query, and to request the remaining only if the user scrolls through the proposal window.

If the matching algorithm is good enough, the user will choose one of the first proposals in most cases.

share|improve this answer
    
I think this rule is too simplistic. Maybe you mean, "Using time delays alone for controlling something is always wrong." If you're saying that time delays cannot be a tool in the toolbox for anticipating the user's needs and desires, then your apps will be less adaptive. –  LarsH Mar 12 '13 at 21:20
    
This rule is proved by all my experience in more than 15 years of work on different engineering and software problems. Although it does not means that one never should use time delays. Sometimes there is nothing else possible, so we are forced to use this only option. But even in these rare cases, it is nevertheless wrong. :) –  johnfound Mar 12 '13 at 23:32
    
OK. My 28 yrs experience in software and UI dev disagrees. So does biology -- clocks (timed delays) are often used, in combination with other strategies, to great effect in adapting to the environment. –  LarsH Mar 13 '13 at 1:44
    
I can't remember some bio process that to depend on time delays in order to control things. There is always some feedback and event driven control. You can't make "adapting to the environment" using hard delays. Using time delays, depending on some conditions is not actually the same, because the delay is not used for control in this case, but the algorithm that compute the needed time. The time delay is just a mediator to some event driven control. –  johnfound Mar 13 '13 at 4:57
    
That's why I suggested that you meant "Using time delays alone for controlling something is always wrong." I assume that "depending on some conditions" is exactly what the OP is describing, though he's not very explicit about it; key events do drive the process, but delays are also part of it. –  LarsH Mar 13 '13 at 13:20
show 2 more comments

I don't have any studies for auto-complete in particular, but perceptible latency for a user interface is thought to be at 100 milliseconds. At that point, the user feels that they are in control and the interface is responsive.

With that in mind, there are a few factors you should consider.

  • How quickly will your query return on slow internet connections/slower computers?
  • How are you optimizing delivery of the data? Is it compressed? JSON? HTML?
  • How much processing power is required for unpacking the returned data?
  • How many concurrent connections can your database/server handle if multiple users are in play?
  • Can the data be cached without hitting the database?
  • Are the results finite enough that they even might be stored on-page?

In general, I would delay lookup until at least 2 characters have been typed, make the lookup an asynchronous request, cache popular queries to avoid a DB hit, and use a JSON format and compress it. And, as Mervin mentioned, if there is a delay for any reason, use a loading icon to let the user know that something is happening. I haven't ever experimented with an intentional lookup delay beyond the two character limit, but I suspect that anything beyond 100 milliseconds round trip wouldn't pass the "it feels responsive test".

Update: On re-reading your question, I see that I missed that it's a Windows app rather than a web app. Most of the advice still applies, however.

share|improve this answer
1  
I also read (in a MCI-script at university no link, sorry), that actions which are faster than 80 milliseconds will be perceived as non-casual (like they happend before a user caused them). So don't make things too fast ;) –  K.. Feb 8 '13 at 11:06
    
Yup, i saw that you focused on web applications, but nevermind, those are good points to consider on this topic. –  dbalboa Feb 12 '13 at 8:05
    
I agree with waiting until at least two, maybe three letters are typed first before looking anything up. In my apps previously I have just searched every two characters typed rather than delaying with a timer. –  nik0lias Mar 21 '13 at 13:21
add comment

I am not sure I understand the logic behind delaying the display of the keystroke. Remember your key stroke is the primary action which the user performs (the resultant search results are secondary) and the user would expect an immediate response to the primary action he has performed. A delay in the response would just confuse him.

However with regards to the delay in showing the search results, I recommend going with either of these approaches :

  • Your responses dont have to be immediate. The Jquery Token Input (an autocomplete plugin itself recommends a delay of 300 millseconds). So a short delay is not going to frustrate the user. However I do recommend showing a in progress indicator which informs the user that search results are being retrieved. To quote this smashing magazine article

Ideally the results will be displayed immediately, but a progress indicator (searching…) should be used for system feedback. Fidelity (below) displays one where the results will eventually be displayed.

enter image description here

  • Since one of your challenges is that there is a scope for a lot of results with each character being added, I recommend allowing the user to scope his results so that the results are both specific to what he is looking for and you also are sending a lesser number of queries out. Here is an example of Google and photobucket do it

UI Patterns For Mobile Apps: Search, Sort And Filter

Designing for the Mobile Web: Special Considerations

share|improve this answer
add comment

I don't actually know about any case studies, but here's what I did when I made an "instant search" in my webapp and why.

I never start any queries automatically after a few characters were typed in. In my opinion search boxes that to this are quite fiddly and annoying. Instead I only submit the query once the user hits enter.

For those who might not know that you can hit enter to submit, I added a little search icon (magnifying glass) inside the search box, which also submits if you click it. Some less experienced users always search for a "submit search" button to click and might be a bit confused if they can't find any.

share|improve this answer
4  
It's not really an instant search then if you have to hit Enter to get any results; that's just a traditional search. –  JonW Feb 8 '13 at 10:22
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.