|
Mailing Lists
|
Home / Groups / ColdFusion Talk (CF-Talk)
Checking for a duplicate value questionAs Andrew says, it's best done in the DB before your data becomes a list. If you can't do that for some reason, convert your list to an array and loop over that. Arrays are much faster than long lists. The longer the list/array, the bigger the performance difference. - Cameron On May 3, 2012, at 12:37 AM, Les Mizzell <lesmizz@bellsouth.net> wrote: > > Got an app that sends out email to various lists - CF8 > > I'm checking to be sure there are any duplicates between the two lists > > req.this list - usually pretty small - ten or so email addresses > req.groupLIST - is the problem - it could be a500 or more addresses at > times. > > <cfloop list="#req.thisLIST#" index="i"> > <cfif NOT listfindnocase(req.groupLIST,#i#)> > DO MY STUFF HERE > </cfif> > </cfloop> > > Is there a more efficient way to do the above? If req.groupLIST ends up > being a HUGE list - at what point will this choke down and time out? > > > > |
May 21, 2013
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||