Sluggish UI after formula in slice, any ideas how to make it less expensive?

Formula says that Date should not be between [startPause] and [endPause].

NOT(AND(date([startPause])<= date(EOWEEK([vToday])-5),
date([endPause])>=date(EOWEEK([vToday])-5))
)

"EOWEEK([vToday])-5" is needed. It defines a specific Monday.

Or maybe this is an expensive thing no matter?

I have 5x6 versions of this in as many slices. (The slices has many other formulas).

UI wasn't sluggish before this.

Another question:

If I have a slice formula with many expressions, if an early expression in the slice excludes it from showing, will it calculate the rest?

 

0 2 93
2 REPLIES 2

Please post expressions in a code block in the future, it makes them way easier to be read and understood.

NOT(AND(
  date([startPause])<= date(EOWEEK([vToday])-5),
  date([endPause])>=date(EOWEEK([vToday])-5)
) )

 No, none of these expressions are very expensive. But if you're running a lot of them, the expense could certainly stack up.

You're simply performing data manipulation on static values in the records. Perhaps you can just calculate those things in new columns in the records themselves, so they're only calculated once, and not every sync? Then in the Slice it'd just be a matter of directly comparing column values, instead of calling functions, which should be at least a little faster (even if they're cheap functions).

I'm not sure what exactly "5x6" is supposed to mean, 30 slices, or...?

Can you describe exactly what UI sluggishness you are experiencing? What are you doing when you notice it? Changing views? Changing data?

 


If I have a slice formula with many expressions, if an early expression in the slice excludes it from showing, will it calculate the rest?


I don't believe this has ever been 100% documented or confirmed. I can only restate from memory what I've seen @Steve mention before, which was:

 

In the past, an IF() expression would terminate on the first matched condition, but an AND() wouldn't terminate on the first un-matched condition.

i.e. IF( condition1 , FALSE , condition2 ) would be more performant than AND( condition1 , condition2 ) , in the case where condition1 is false, because the former would NOT evaluate condition2, but the latter still would.

 

But more recently, I believe the above got improved, so that they were similar performance.

 

Not sure if that makes sense the way I wrote it. And again, I'm just restating Steve's post from memory, possibly not actual facts.

@Marc_Dillon Thank you for the elaborate response! ๐Ÿ˜Š

The UI sluggishness is that on every thing i clicked it takes 2 seconds before it moves to another view, regardless if that view has the heavy slice formulas or not.

 

30 slices.

Good idea with calculating in sheet. 

I solved the issue partly by using security filters on the slices's table to limit the load. Also putting the mentioned formula at the end of the slice expression helped a little bit (I believe)

Top Labels in this Space