Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Extension object calculations - Server or Local?

Hi QlikViewers,

I am planning to make an extension object for a custom requirement.

Since all the code in QlikView is hosted in memory, all the calculation and heavy lifting is done in the QV server.

But if I am using extension and calculating measures and presentation views in Javascript, where does the processing happen. On the local client of the user or on the server?

I think since javascript always executes on local machine, server will have very less to do apart from hosting the QVW data in memory?

Thanks

Raghu

1 Solution

Accepted Solutions
Brian_Munz
Employee
Employee

Hi Raghu,

You are correct that for all "regular" QlikView objects the heavy lifting is done by the server.  For extensions, though, you need to be more careful since they're rendered in JavaScript, which is a client-side technology.  So, basically, simply loading a million rows data into an extension and doing the calculations within the extension is a bad idea and not work very well at all.  BUT, this can be avoided in most cases.  Extensions are essentially straight tables so they require and offer expressions and any other calculations that need to be done.  So through this expression, the calculations will be done on the QlikView side, and the result set will be loaded into the extension.

So, for example, if you had an extension of a pie chart (for some reason), you could have that pie chart based on a billion rows of data, but all you really need to display the chart is the size of the pie pieces.  So the calculating of those billion rows can be done on the QlikView side, and the values of the slices can be passed into the extension.  If you have to have larger buts of data, you can also work around in other ways by using pagination in the extension object where you only load a certain amount of data at a time.  So if you had to have a giant table of data, you could potentially just show the first 20 rows then have the user page through the rest.

Does that make sense?  To sum up, yes, extensions work on a client side technology which would make heavy lifting a bad idea inside the extension, BUT, it's not difficult to use QlikView to do the heavy lifting BEFORE sending the data into the extension.

View solution in original post

2 Replies
Brian_Munz
Employee
Employee

Hi Raghu,

You are correct that for all "regular" QlikView objects the heavy lifting is done by the server.  For extensions, though, you need to be more careful since they're rendered in JavaScript, which is a client-side technology.  So, basically, simply loading a million rows data into an extension and doing the calculations within the extension is a bad idea and not work very well at all.  BUT, this can be avoided in most cases.  Extensions are essentially straight tables so they require and offer expressions and any other calculations that need to be done.  So through this expression, the calculations will be done on the QlikView side, and the result set will be loaded into the extension.

So, for example, if you had an extension of a pie chart (for some reason), you could have that pie chart based on a billion rows of data, but all you really need to display the chart is the size of the pie pieces.  So the calculating of those billion rows can be done on the QlikView side, and the values of the slices can be passed into the extension.  If you have to have larger buts of data, you can also work around in other ways by using pagination in the extension object where you only load a certain amount of data at a time.  So if you had to have a giant table of data, you could potentially just show the first 20 rows then have the user page through the rest.

Does that make sense?  To sum up, yes, extensions work on a client side technology which would make heavy lifting a bad idea inside the extension, BUT, it's not difficult to use QlikView to do the heavy lifting BEFORE sending the data into the extension.

Not applicable
Author

Thanks Brian sharing the insight. So we will need to do the heavy lifting on our data model side so that all the calculations are done there.

Just one thing and it may be silly question to ask. Can we do anything here with server side java scripting so that it executes on the QV rather than on client?

Thanks

Raghu