Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

search filter: very poor performance #4271

Closed
mccxiv opened this issue May 2, 2012 · 7 comments
Closed

search filter: very poor performance #4271

mccxiv opened this issue May 2, 2012 · 7 comments

Comments

@mccxiv
Copy link

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
Copy link
Contributor

This sounds similar to #4162

@toddparker
Copy link
Contributor

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?

@yaffol
Copy link

yaffol commented May 24, 2012

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
Copy link
Contributor

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

@jaspermdegroot
Copy link
Contributor

@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
Copy link
Contributor

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

@arschmitz
Copy link
Contributor

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants