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({}))

  • A Score Level 2
    in reply to Peter Lewis

    i have written code in a!localVariables(....)

    in first variable i am calling query entity 

    i got the issue the first variable which contains a!queryEntity() is always executing when ever we are calling the local variable 

    can you tell me what to use in a!refreshVariable 

    basically it is having with() functionality

  • Certified Lead Developer
    in reply to Nikkheel

    How do you know that the query is being called again?  Do the values change?  Or are you just seeing a large number of milliseconds?

    How did you set the refresh of the union() based local variable?  Are you doing the union operation every turn?

Reply Children
No Data