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 8261003
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T03:15:02+00:00 2026-06-08T03:15:02+00:00

I have a web-page that looks like this (simplified example) <table id=events_results_table> <thead> <tr>

  • 0

I have a web-page that looks like this (simplified example)

<table id="events_results_table">
    <thead>
        <tr>
            <th class="header">Title One</th>
            <th class="header">Title Two</th>
        </tr>
    </thead>
    <thead>
        <tr>
            <td><input id="search" type="text" /></td>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td>value 1</td>
            <td>...</td>
        </tr>
        <tr>
            <td>value 2</td>
            <td>...</td>
        </tr>
    </tbody>
</table>

I also have some javascript on that page that looks like this

$("#search").keyup(function(event){
    var theText = $('#search').val();
    $('#events_results_table tbody tr td').closest('tr').hide();
    $('#events_results_table tbody tr td:contains("'+theText+'")').closest('tr').show();
});  

This implements a rudimentary text filter where, as the user types letters into the search field, rows which do not match are hidden, and rows that do match show. A simple table search.

The problem is, this naive implementation suffers from a performance bottleneck if there’s a few hundred rows in the table. The rows don’t always respond to the keyboard, or the input in the keyboard blocks until the table has caught up.

Is there “known science” for implementing this sort of functionality in a performant way? I can think of a few different approach myself, but wanted to make sure I wasn’t reinventing an already solved problem before I started.

  • 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-08T03:15:04+00:00Added an answer on June 8, 2026 at 3:15 am

    Yes there is, setting a ~0.5 second timeout on typing, resetting the timer when a new key comes in. When the timeout finishes, the results are updated. No one will watch the results while actually typing a word.

    While this doesn’t actually improve performance, it improves the usability a lot.

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

Sidebar

Related Questions

If I have a simple web page and script that looks like this: <body>
I have web page that looks like this: Image on the left - text
i have a web.config file that looks like this: <?xml version=1.0?> <configuration> <system.web> <compilation
I have a MyClassFile.cs file that looks like this: public class MyClass1 { public
I have an error page, anyError.cfm , that looks like this <!DOCTYPE html> <html>
I have a web page that consists of a checkbox (parent) and on this
I have a web page that loads two images from a css sprite like
We have some html that looks like this: <form id=MyUserControl runat=server method=post> <script language=javascript
I have a web page. This web page looks correct in IE 7, 8
I have a web page with embedded PDF on it. My code looks like

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.