Skip to content

search filter: very poor performance #4271

Closed
mccxiv opened this Issue May 2, 2012 · 7 comments
@mccxiv
mccxiv commented May 2, 2012

On an iPod 4g running ios 5.1 when searching large lists like this one http://jquerymobile.com/demos/1.1.0/docs/lists/lists-performance.html the first letter takes more than 2 seconds to appear.

I've tried changing the search function to the following:
(console is just to make sure i was doing it right)

$(".ui-listview").listview('option', 'filterCallback', function (text, searchValue) {                   
    console.log('custom search fn called');
    return false;
});

No actual search is going on and the list doesn't change but it STILL takes ~2.5 seconds per letter so i'm not sure what the bottleneck is.

@jaspermdegroot
jQuery Foundation member

This sounds similar to #4162

@toddparker

I think this just may due to a performance regression in general on large lists, see #4340. Do you see similar issues on shorter lists or only on lists with hundreds of nodes?

@patrickpawsey

I see this issue on lists with links which are larger than around 50 items.

On a ZTE Blade running Android 2.3.7:

With around 50 items, It takes about 1 second from tapping the 'filter' input to get the keyboard and cursor up, and the first letter takes less than second to show up in the filter input, and the updated filtered list shows up concurrently. Subsequent letters are very quick.

With around 100 items, It takes about 2 seconds from tapping the 'filter' input to get the keyboard and cursor up, and the first letter takes around 1 second to show up in the filter input and another second show updated filtered list. Subsequent letters get a faster repsonse.

With around 200 items, it takes about 3 seconds from tapping the 'filter' input to get the keyboard and cursor up, and the first letter takes around 2 seconds to show up in the filter input and another second show updated filtered list. Subsequent letters get a faster repsonse.

With around 300 items, it takes about 4 seconds to get into the input, 3 to input the first letter and show the filtered list.

With around 400 items, it takes about 4 seconds to get into the input, 4 to input the first letter and show the filtered list.

And on an iPhone 3GS, results follow the same pattern but are slightly (max ~1 second) faster.

@toddparker

@gabrielschulhof - we should test the filter performance once you make that blur tweak and possibly close this out.

@jaspermdegroot
jQuery Foundation member

@arschmitz

You were planning on changing listview.filter into an widget extension for 1.4, right?
Let see if we can improve the code to speed things up a bit.

@arschmitz
jQuery Foundation member

@uGoMobi yes that's going to be part of widget review

@arschmitz
jQuery Foundation member

this is a whole new stand alone widget now so im closing this because the refrenced code ( listview filter ) no longer exists

@arschmitz arschmitz closed this Aug 7, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.