GithubHelp home page GithubHelp logo

Comments (6)

brianlittmann avatar brianlittmann commented on August 15, 2024

Note: This works in Chrome (26), but appears to have adverse effects in Firefox (19) and makes IE 9 unresponsive. I probably shouldn't be filtering 8000+ elements anyway...

from jquery-fastlivefilter.

mattjacobson avatar mattjacobson commented on August 15, 2024

I am having the same issue with a smaller list size (noticeable hangups filtering ~1.5k entries). Admittedly that is still a very large list to be filtering client side.

The weird thing is that forward filtering (that is to say typing an entry) works great, but erase all of the characters in the search box and it all lags hard.

My javascript skills are a bit lacking, but I had a thought. Why can't we have an external condition that intercepts the loop. Pseudocode thoughts as follows:

on-change {
if(filter is empty){
reset all elements to visible
}
else {run the rest of the loop}
}

Have any thoughts? (will it work / anyone willing to help me code that bit up)?

fast-filter-console results

from jquery-fastlivefilter.

brianlittmann avatar brianlittmann commented on August 15, 2024

That's sort of a one-off solution. After you've filtered down to "gold", what happens if you delete all but one character, leaving "g"? Is it still slow? 1.5k elements shouldn't be too troublesome, as the demo has over 2k.

Also, your actual search time is quite slow. For me, the search itself didn't take too long, it was updating the DOM that was taking forever.

from jquery-fastlivefilter.

mattjacobson avatar mattjacobson commented on August 15, 2024

Truthfully I am not sure what is causing the hold up, but certainly deleting all of the characters at once (ie. clearing the filter) seems to hold things up quite a bit.

I ran a couple tests and can attach the following screenshot:
fast-filter-console results2

It seemed to move decently fast when incrementing by one character and even works great going from empty to "gold" directly. But move from "gold" to "" and the entire browser window hangs.

On second look, I realize that there is no problem with the example page, and I am beginning to think this is my implementation.

It's just very baffling to me.

from jquery-fastlivefilter.

leosok avatar leosok commented on August 15, 2024

I have exactly your problem! I have 8109 entries and the "forward" works perfekt on both crome and firefox, but "backwards" it kills chrome/ lets firefox take some long break. It would be awsome if someone could sort that out. Here's a fiddle with my original data:

http://jsfiddle.net/Wp8bJ/

from jquery-fastlivefilter.

leosok avatar leosok commented on August 15, 2024

Any Idea, if there is a fix?

from jquery-fastlivefilter.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.