Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
$.find: added indexOf checking for jqmData selector to improve speed on non-jqm selectors #5999
$.find always runs regexp on given selector string. The problem is, that some apps (and even some widgets) do more normal selector searching than :jqmData searching.
I added checking for :jqmData keyword in selector by simple indexOf method, which is faster, not that it makes a huge difference, but still.
Please refer to the test on http://jsperf.com/jquery-mobile-find-patch-performance-fix
Note that the
jqmSelector = ":jqmData", jqmDataRE = /:jqmData\(([^)]*)\)/g;
duplication could be changed also