vendredi 17 avril 2015

Coldfusion 8 Most efficient use of variable


Vote count:

0




I am parsing a file and need to do something based on the files content. Which is most efficient, would use less resources or is best practice.(1)Accessing the file item within the if statement directly or (2) assigning that items value to a variable. Here is an example of each: (1)



<cfset file = XmlParse(file.filecontent)>
<cfif file.item1.xmltext neq "" & file.item2.xmltext neq "">


or


(2)



<cfset file = XmlParse(file.filecontent)>
<cfset item1 = file.item1.xmltext>
<cfif item1 neq "">


Keeping in mind that the same variable maybe accessed a few times throughout the program to test conditions.



asked 27 secs ago







Coldfusion 8 Most efficient use of variable

Aucun commentaire:

Enregistrer un commentaire