regarding performance for local variable

Hi All

In 1st local variable i am calling an exprission rule and getting the data 

In 2nd local variable i am using UNION(local!associatedCompanies1,local!associatedCompanies1)

but why the execution time is more for 2nd variable 

I thing this expression rule is calling second time in 2nd variable

can any one tell me why it is happning 

  Discussion posts and replies are publicly visible

Parents
  • It's a little hard to tell without a bit more information (what is the SAIL for your interface? what is the expression rule called in the first variable?), however a couple general suggestions:

    • Use variables that don't refresh as much as you can. Basically, don't use with() or refreshAlways in a!localVariables().
    • Union can be a slow operation depending on the data. One way to make it faster is to union against a null list instead of against the same data again. Here's an example:

    union(local!associatedCompanies, touniformstring({}))

Reply
  • It's a little hard to tell without a bit more information (what is the SAIL for your interface? what is the expression rule called in the first variable?), however a couple general suggestions:

    • Use variables that don't refresh as much as you can. Basically, don't use with() or refreshAlways in a!localVariables().
    • Union can be a slow operation depending on the data. One way to make it faster is to union against a null list instead of against the same data again. Here's an example:

    union(local!associatedCompanies, touniformstring({}))

Children