-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
With very large lists, the DOM updates slowly when filtering up (clearing the query). #13
Comments
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... |
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 { Have any thoughts? (will it work / anyone willing to help me code that bit up)? |
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. |
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: |
Any Idea, if there is a fix? |
In my case, I have a list of 8000+ elements. Filtering down works fine, but when clearing the filter (or removing most of it), the function finishes quickly but the DOM takes too long to update, often freezing the page.
A simple solution is to detach the elements before changing the display property for each and appending them afterward.
The text was updated successfully, but these errors were encountered: