fmpvince

Calc engine questions for optimizations

Discussion created by fmpvince on Nov 23, 2011
Latest reply on Nov 21, 2013 by DavidJondreau

Hi,

 

We need to get answers from Filemaker Engineers about how works the cal engine to better optimise our calcs fields.

 

 

Here's some questions (I know that some example don't make sense but that's to illustrate the point)

 

1. Once the cal engine gets a related field for the first time does it cache it or does it fetch it whenever and as many time he finds it.

 

So which is faster :

 

my_unstored_related_table::value+my_unstored_related_table::value+my_unstored_related_table::value+my_unstored_related_table::value

 

or

 

Let(value=my_unstored_related_table::value;value+value+value+value)

 

If the cal engine caches my_unstored_related_table::value performance should be the same

 

 

2. Considering a List view, where there's 4 fields, 3 of of them referencing the first one which itself gets some values from un unstored calc, is the first field cached ?

 

field1 : my_unstored_related_table::value*my_unstored_related_table::value+my_unstored_related_table::value

 

field2 : field1*2/3

field3 : field1*12

field4 : field1/15

 

in other words, would field2,field3,field4 recalculate field1 ecah time (trigerring this my_unstored_related_table::value*my_unstored_related_table::value+my_unstored_related_table::value)

 

3. In the above example, Is it better, for performance, to reference a field, or to recalculated it completely

 

so is this below faster than 2.

 

field1 : my_unstored_related_table::value*my_unstored_related_table::value+my_unstored_related_table::value

 

field2 : (my_unstored_related_table::value*my_unstored_related_table::value+my_unstored_related_table::value)*2/3

field3 : (my_unstored_related_table::value*my_unstored_related_table::value+my_unstored_related_table::value)*12

field4 : (my_unstored_related_table::value*my_unstored_related_table::value+my_unstored_related_table::value)/15

 

Thanks.

 

P.S : If it does not cache, then i think it definetly should

Outcomes