Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9266547
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T14:20:39+00:00 2026-06-18T14:20:39+00:00

Something that I have been thinking about lately is how do sites such as

  • 0

Something that I have been thinking about lately is how do sites such as imdb or github have such fast search recommendations as I type in the search bar. Most jQuery plugins I found that do this dump the data set on to the page and then play with it there. But this would not work with large sets of database as it would make page weight colossal. My first idea was possibly a synchronous ajax call, but I was told that this could cause freezing until execution had completed.

The question: How to pull like records from a large data set while typing into a form and then display the results.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T14:20:41+00:00Added an answer on June 18, 2026 at 2:20 pm

    I recently built something like this for a FAQ, the 2 biggest problems you face are the follow:

    • Database read time, the amount of time it takes to run your search query on your DB
    • Your call time, if someone type 3 characters in a second then you are doing 3 ajax calls in a second.

    If it is a very basic search the first issue isn’t such a big issue, you can easily query a smallish table in milliseconds, but when search mass text it gets slow. The best way to get past the is to get a search engine like Sphinx or Solr. They index data from your database for quick and relevant look ups.

    The second is solved with a perception, when there is a break of less than a second (this depends on the computer literacy of your audience) between the users key strokes you DO NOT do the look up. that means that only when they slightly pause a lookup will take place. This means fewer queries and less strain on your system. Example below:

    var typingTimer;
    var doneTypingInterval = 1000;
    
    $('.huge-input').stop().keyup(function(e){
        if ((e.which <= 90 && e.which >= 48) || e.which == 8){
            var myHugeInput = $(this);
    
            clearTimeout(typingTimer);
            typingTimer = setTimeout(
            function(){
                    //Do the look up and set data
                },
                doneTypingInterval
            );
        }
    });
    

    So here we check on an input box for a valid key enter, we clear the timer and then set a time out for 1000 milliseconds (1 second), when the time runs out it does the search and sets the data, but if there is another valid key stroke in that second it clears the timer and resets it.

    Hope this helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This question is just something that I have been thinking about lately. Can a
Here's something I've been thinking about: suppose you have a number, x, that can
Lately I have been thinking about investing in a worthy USB pen drive (something
For about a year I have been thinking about writing a program that writes
I've been thinking about how to implement something that, frankly, is beyond my mathematical
Lately I've been thinking about writing my own language - something I've wanted to
I have been thinking about a regular expression that can transform a list like
I have a problem that I have been thinking about, but I can't really
I've been thinking a lot lately about how cool it would be to have
I've been thinking about software estimation lately, and I have a bunch of questions

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.