House of Fusion
Search over 2,500 ColdFusion resources here
  
Home of the ColdFusion Community

Mailing Lists
Home / Groups / ColdFusion Talk (CF-Talk)

Checking for a duplicate value question

Author:
Cameron Childress
05/03/2012 07:13 AM

As 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? > > > >


Search cf-talk

May 21, 2013

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
       1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31   

Designer, Developer and mobile workflow conference