Do Objects Hidden in Containers get Calculated?
My colleague and I recently were having an issue with a QV app in that it was taking up huge amounts of RAM on the server. Part of the reason was that the app was data-heavy and not well optimized. But we were also concerned about sheets that had many, MANY objects on them. The developer had put these objects into containers. So started a heated debate on whether the objects not being displayed in a container were being calculated or not.
Although I always assumed that an object hidden by any means does not take up resources, after viewing a few posts in the community, I was starting to doubt myself.
Setting up the Test
So I set up a little experiment. I developed a set of 1 million random values tied to a list of 1 million addresses and a calendar to try to closely mimic a true QV app. Then I added 2 list boxes, 3 straight tables and a pivot chart to the display. I then copied the app three times and adjusted so I ended up with the following:
- Objects exposed
- Objects minimized
- Objects in a container
- Objects hidden
I then created four memory statistics files and ran them through the QlikView Optimizer: QlikView Optimizer.qvw
(Settings –> Document Properties –> General –> Memory Statistics)
The results were a relief.
It appears that as far as the sheet object resources go, there is very minimal amount of RAM used in either the hidden state or the minimized state. The container ram is relatively higher than zero only because one of the tables is visible in the object at any one time so that is the only object taking up space. And even more encouraging, you can see that calculation time (or CPU cycles) are only utilized for the original (all exposed objects) application and no calculation time registers at all for the other apps, including the containerized version.
This is good news because ANY of these methods that you choose to hide objects from user view will make efficient use of server resources. Any hidden QlikView object will not calculate. So as a general rule, if you can’t see the object, it is not using resources.
This experiment could have holes. If you have evidence refuting this or clarification that we should be aware of, please leave a comment.