Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
gustavgager
Partner - Creator II
Partner - Creator II

Macro to wait for graph to be calculated

Hi there!

Im trying to make a benchmark of sorts. The plan is to bake a small application that opens a QVW in qlikview desktop and then make all possible selections in all fields in that qvw and then calculate the time it takes to do that selection. Everything works fine except that all the selections seems to take about 200ms. Ive concluded that when a selections is made, the new selection is made befor the graphs and tables have been populated with data. So my question is, is there a way to make the script wait utill all the data has been displayed befor moving on to the next selection?

Any help is appritiated.

1 Solution

Accepted Solutions
gustavgager
Partner - Creator II
Partner - Creator II
Author

I actually think i found a solution:

$document.GetApplication.WaitForIdle

This seems to wait utill QV is idle and the continue.

Im running my testapplication now (but it takes a while to finsih). I will write here again with the reuslts.

EDIT: Confirmed. Works great!

View solution in original post

4 Replies
Luis_Cortizo
Former Employee
Former Employee

Hi, Gustav

   Yes you're right, the selections are always calculated before starting to populate all the charts.

I believe you will find these two posts on the QlikView Design Blog quite interesting:

http://community.qlik.com/blogs/qlikviewdesignblog/2013/08/20/the-calculation-engine

http://community.qlik.com/blogs/qlikviewdesignblog/2013/07/15/logical-inference-and-aggregations

To measure times and performance, I can recommend you the tutorials published on the QlikView Scalability group and the guides to use JMeter:

Tutorial on load tesing Qlikview 10 with JMeter

(it's for version 10, but is pretty much the same thing for v11).

Hope it helps.

gustavgager
Partner - Creator II
Partner - Creator II
Author

Hi.

Thank you for the links. I have done some testing with Jmeter, and its not a simple tool to use (to say the least) and it also does not do what i want it to do.

I want a way to find what selections take the longest time to calculate/display, and i want to do it localy with my QV Desktop using a local qvw.

Is there a way to "hold" the execution of the macro utill all charts have been calculated (for the selection that was just made). And then go on and do a new selection once thats done.

Luis_Cortizo
Former Employee
Former Employee

No, certainly is not a simple tool to use, you're right (not very intuitive also).

The thing is that the calculation/display are two different processes.

The first one is called Logical Inference on the Henric Crönstrom post, meaning finding all possible values for all the fields once you have made a selection. This calculation will vary in time depending on the amount of data loaded and selected (it always takes more time to filter a small data model than a pre-selected one).

After that, several threads are launched (one per object) and in the case of charts, one per chart to perform the rendering. With JMeter you can measure the response time for this object but I can't think of a way to measure the Logical Inference step response time (to be sincere), let's hope that someone shows up in this thread with more information.

Still I don't understand what you mean by "Is there a way to "hold" the execution of the macro". What macro are you pointing here?. All the calculation and rendering operations are not performed with a macro...

gustavgager
Partner - Creator II
Partner - Creator II
Author

I actually think i found a solution:

$document.GetApplication.WaitForIdle

This seems to wait utill QV is idle and the continue.

Im running my testapplication now (but it takes a while to finsih). I will write here again with the reuslts.

EDIT: Confirmed. Works great!