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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T21:03:52+00:00 2026-05-12T21:03:52+00:00

I have a relatively large dataset of items (a few thousand items) that I

  • 0

I have a relatively large dataset of items (a few thousand items) that I want to navigate by applying a number of filters client side in a web application. Applying the filtering logic itself is not an issue, the question is about which method to use for updating the table of matching results to get the best user experience. The methods I’ve come up with are:

  1. Setting the class of each row to hide or show it (using visibility: collapsed to hide it), and keeping the DOM element in the table.
  2. Keeping a DOM element for each data item, detaching/attaching it to the table to hide and show it.
  3. Just keep an abstract object for each data item, creating a DOM object on demand to show it.

Which one is likely to give the best user experience? Any other recommended method besides those I’ve listed already?

  • 1 1 Answer
  • 1 View
  • 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-05-12T21:03:52+00:00Added an answer on May 12, 2026 at 9:03 pm

    If the display area has fixed size (or at least a maximum size), and you must filter on the client-side, I would not create a DOM node for each item, but instead reuse a predefined set of DOM nodes as templates, hiding unnecessary templates depending on the number of results from the filter. This will drastically reduce the DOM nodes in the document which will keep your page rendering responsive and is fairly easy to implement.

    Example HTML*:

    <ul id="massive-dataset-list-display">
        <li>
           <div class="field-1"></div>
           <div class="field-2"></div>
           <div class="field-n"></div>
        </li>
        <li>
           <div class="field-1"></div>
           <div class="field-2"></div>
           <div class="field-n"></div>
        </li>
        <li>
           <div class="field-1"></div>
           <div class="field-2"></div>
           <div class="field-n"></div>
        </li>
        .
        .
        .
    </ul>
    

    Example JavaScript*:

    var MassiveDataset = function(src) {
        var data          = this.fetchDataFromSource(src);
        var templateNodes = $("#massive-dataset-list-display li");
    
        // It seems that you already have this handled, but just for 
        // completeness' sake
        this.filterBy(someParam) {
            var filteredData = [];
            // magic filtering of `data` 
            this.displayResults(filteredData);
        };
    
        this.displayResults(filteredData) {
            var resultCount = filteredData.length;
    
            templateNodes.each(function(index, node) {
                // There are more results than display node templates, start hiding
                if ( index >= resultCount ) {
                    $(node).hide();
                    return;
                }
    
                $(node).show();
                this.formatDisplayResultNode(node, filteredData[i]);
            });
        };
    
        this.formatDisplayResultNode = function(node, rowData) {
            // For great justice
        };
    };
    
    var md = new MassiveDataset("some/data/source");
    md.filterBy("i can haz filter?");
    

    * Not tested. Don’t expect copy/paste to work, but that would be cool.

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

Sidebar

Related Questions

I have this relatively large numerical application code that may run for a few
I have a relatively large database tables (just under a million rows) that has
I have some relatively large legacy method that I would like to refactor. It
I have a relatively large C#/WPF Visual Studio 2008 solution that I am trying
I have a relatively large strings that will not change during my program run.
I have a relatively large database application that has a user table with a
I have quite a relatively large number of data, it has 80 columns and
I have a relatively large dataset (16,000+ x ~31). In other words, it's large
I have a need to run a relatively large number of virtual machines on
I've got a relatively large .Net system that consists of a number of different

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.