There are 2 arrays. arrPermissionDeny is to store the function id which is denied to the user. arrPermissionAccess is to store the function id which is allowed to the user. After the following programming has been run, a final permission access is expected.
The logic of the programming is ok. However, the performance is very bad.
<cfloop index="i" from="1" to="#ArrayLen(arrPermissionDeny)#">
<cfloop index="j" from="1" to="#ArrayLen(arrPermissionAccess)#">
<cfif arrPermissionDeny[1] eq arrPermissionAccess[j][1]>
<cfset tmp = ArrayDeleteAt(arrPermissionAccess,j)>
<cfbreak>
</cfif>
</cfloop>
</cfloop>
Is there any suggestion to improve the performance?
The logic of the programming is ok. However, the performance is very bad.
<cfloop index="i" from="1" to="#ArrayLen(arrPermissionDeny)#">
<cfloop index="j" from="1" to="#ArrayLen(arrPermissionAccess)#">
<cfif arrPermissionDeny[1] eq arrPermissionAccess[j][1]>
<cfset tmp = ArrayDeleteAt(arrPermissionAccess,j)>
<cfbreak>
</cfif>
</cfloop>
</cfloop>
Is there any suggestion to improve the performance?