I don't think that's going to be much of a performance problem, but it might
be cleaner to pass the 5 part numbers as a list and have that method return
the part number list.

It also depends on what's happening inside the DAO cfc. If you're running a
query every time you call eccnLookUp() then you can almost certainly improve
the performance by passing a list and using it in the SQL to return multiple
records. How and if you can do that will depend on your database.

Whether the performance difference would be noticeable is something that you
can only find out by load testing.

Spike

--------------------------------------------
Stephen Milligan
Code poet for hire
http://www.spike.org.uk

Do you cfeclipse? http://cfeclipse.tigris.org


>-----Original Message-----
>From: [EMAIL PROTECTED]
>[mailto:[EMAIL PROTECTED] On Behalf Of Ben Densmore
>Sent: Tuesday, August 10, 2004 11:14 AM
>To: CF-Talk
>Subject: Is this too much?
>
>I have a function called eccnLookUp() that accepts one argument named
>"PartNumber". In another cfc I need to do 5 calls to this function and
>pass in 5 different part numbers. Would this be a huge hit on the
>server to do it like:
>
><cfset variables.partNum1 =
>variables.sampleDAO.eccnLookUp("#sampleInfo.getSample().getPart
>Num1()#")
> />
><cfset partNumList =
>listAppend(partNumList,variables.partNum1.ECCN,",")  />
>
><cfset variables.partNum2 =
>variables.sampleDAO.eccnLookUp("#sampleInfo.getSample().getPart
>Num2()#")
> />
><cfset partNumList =
>listAppend(partNumList,variables.partNum2.ECCN,",")  />
>
><cfset variables.partNum3 =
>variables.sampleDAO.eccnLookUp("#sampleInfo.getSample().getPart
>Num3()#")
> />
><cfset partNumList =
>listAppend(partNumList,variables.partNum3.ECCN,",")  />
>
><cfset variables.partNum4 =
>variables.sampleDAO.eccnLookUp("#sampleInfo.getSample().getPart
>Num4()#")
> />
><cfset partNumList =
>listAppend(partNumList,variables.partNum4.ECCN,",")  />
>
><cfset variables.partNum5 =
>variables.sampleDAO.eccnLookUp("#sampleInfo.getSample().getPart
>Num5()#")
> />
><cfset partNumList =
>listAppend(partNumList,variables.partNum5.ECCN,",")  />
>
>Thanks,
>Ben
>
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to