Qlik Community

App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
QLIKWORLD LIVE! MAY 16 - 19TH, EARLY BIRD DISCOUNTS! REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
krumbein
Partner
Partner

Prerequisistes for caching

Hello!

I have read many times (and believed until now), that calculations in QlikView are cached and thus not repeated, when not need be.

Now I have been working on a Dashboard, which had unsatisfactory response times. We have two different time periods and three different scopes for the points of sale, that we look at: the selected POSs themselves, the regions the selected POSs belong to and the entire organization. Combine those two periods with three different scopes and you get six different values, that everything boils down to.

Those six variables are processed in different ways. There might be calculations like

NowScope1 - NowScope2
(NowScope1 / PriorScope1) - 1
RangeMin(NowScope1, NowScope2, NowScope3, PriorScope1, PriorScope2, PriorScope3)

You get the drift, but eventually it is those 6 values everything boils down to.

So far I have been using variables extensively, to build the formulas to calculate those values. I am thus pretty confident, that, after all text replacement had been done, I had a characterwise perfect equality for each occurance of those formulas and thus expected the cache to help me out.

Now I have switched to precalculating those 6 values with variables (those with an equal sign in the front) and thus  basically forced caching. The app now only takes less than a third of the time to update.

On another occasion I tested a table with one expression vs the same table with that very same expression (copy & paste) in triplicate. The response times were still slower. If that can't be cached, then what can?

So my question is: what am I missing regarding the caching functionality? Am I expecting too much? Have I misunderstood something?

I have no doubt about caching when it comes to moving backwards and forwards in the selection history. That works!

Thanks!

Sandro

1 Reply
marcus_sommer
MVP & Luminary
MVP & Luminary

Maybe the context in which the calculations are performed is in any way different to each other. Beside the fact that already the slightest difference in writing the expression like: sum(F1) vs. Sum(F1) vs. =sum(F1) vs. = sum(F1) prevents the caching it's quite likely that the used dimensions and their order have an impact and probably further measures like the formatting, sorting and similar stuff, too. Therefore could you be sure that there is everything identically between both compared scenarios?

- Marcus