@Frode/KidsKilla: In jQuery 1.2, using either of the methods you show is dog-slow! The custom function I used was *dramatically faster* regardless of how specific I was in the selection code. Even adding a container to limit the searching to a subset of fields on the page was inadequate.
@John: That sounds great! I need compatibility all the way back to IE6, so I'll do some speed comparison tests when I get a chance. /Kevin On Feb 7, 2:39 pm, John Resig <[email protected]> wrote: > Yes, jQuery 1.3/Sizzle has much faster form field selection. We use > the native getElementsByName now (we didn't in 1.2.6) so it'll be as > fast as we can get. > > --John > > > > On Sat, Feb 7, 2009 at 4:17 PM, Kevin Dalman <[email protected]> wrote: > > > I work on complex web-apps with over 100 form fields per page, in > > addition to hundreds of other DOM elements. I found that the selector > > syntax $("[name=myFormField]") was slow to the point of being > > unusable! I did not want to add IDs to every field, so I created a > > custom method - $N("myFieldName") - that is dramatically faster. I > > only use the [name=] syntax when I need partial name matches. > > > However, I'd much rather use native jQuery syntax for my new project, > > so my question is: > > > Does Sizzle have a better method and performance for finding form > > fields 'by name'? If not, is there anything in the roadmap that would > > address this basic need? > > > This is a major performance issue to me, so any and all info related > > to form and field handling is appreciated. > > > /Kevin Dalman --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "jQuery Development" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en -~----------~----~----~----~------~----~------~--~---
