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

Display Images in Text Box - Performance Issues

I have a page that is basically all image displays.  I have three displays, high (green up arrow), low (red down arrow) and no change (grey led), basically this is a quick "indicator" page on various company values.

My issue is, there are 8 teams each with 7 "indicators", so 56 objects updating based on various user input.  For example, include "other revenue category", user selects yes or no and thereby changes gross profit calculation and subsequently most, if not all, of the 56 items update.

As it stands, all my calculations and "indicators" work, however the page is ridicously slow.  I originally started with very difficult and multi-layered if/then formulas and have since spent many hours re-tooling the calculations into variables.  And regardless of the amount of rework, each of the 56 objects still has at least two if/then statements to get to the desired image value. 

UPDATE: I have since reduced each to just a high/low, thereby making each object a single if/then and the performance still has not increased. 

Since I was able to remove many of the if/then statements I expected a noticable performance gain, but now am thinking it's simply due to the amount of visible objects. 

Anyone have any thoughts on the subject?

Thanks, Dave.

18 Replies
johnw
Champion III
Champion III

I don't think the images are the problem based on some quick testing.  I just built a page with 150 random up or down arrows selected with an if().  It takes about 1/3 of a second to render them on my old computer.  With 1/3 the images and likely a faster computer, I wouldn't expect you to have any problems as a result of the images themselves.

It's easy enough to test, though.  Clone the tab and change all the text box representation to text instead of image on the general tab in the properties.  Does the new tab render quickly or just as slowly?  If quickly, then the problem probably IS the images.  If just as slowly, your problem probably lies elsewhere.

Not applicable
Author

Thanks John, very helpful indeed.

Interestingly I have an input field on this page so we can change back and forth between the numeric (or text display) and the arrow image.  As text, the rendering is nearly as bad.  This is partly why I thought the problem was more about the count of active items, not necessarily text vs image (though that had crossed my mind as well).

I've also recreated your test and have started loading in the other factors.  For example each arrow has a comparative on the display (to hide when we choose to view the text representation), each has a caption which shows the % change in conjunction with the arrow image, etc.

So far, nothing seems to worsen the speed on the test which gets me back to where the chasing of my tail began in the first place, the calculations.  And frankly at this point I'm at a loss as to how to accelerate them any more.  ARGH!

Not applicable
Author

Hey John -

So let me put this out there, I'm no programmer (or even IT), I'm an accountant.  But I dabble in this stuff because I have a knack for it.  So I'll say up front there is a real chance there is a better way to do any of this stuff.

With that understanding out there, I've attached a test qvw and a word doc.  This qvw is essentially replicating the malfunctions I'm experiencing in my production document. 

Note that when comparing the word doc and qvw, the first three rows of image objects all have the same formula, except that not all of them are giving the same result.  Basically the qvw doc is failing part way through the render.  If you play around with changing the inputs 1-5 you'll get similar results, though not consistently.

Also look at all of the variables, I have a pretty nasty if/then variable called "vallinputs" which evaluates all 5 user inputs to a single output string.  This is also replicating my production doc in that all the inputs are aggregated to a single result which I use inside my conditional image statements.

In production, the rendering is not only failing on updating all values, but also has the previously mentioned speed problems.  As your test helped proved out I'm now convinced that is more to do with the ability of the variables and calculations.

Any thoughts on perhaps changing up the way I'm handling the inputs or any thoughts over why the doc is failing?

Thanks again, Dave.

Not applicable
Author

Perhaps I should look at adding another sql table that has the values for the user inputs.  I can then change my "ugly" variable into a set analysis statement that simply looks up the value rather than using a 32 nested if/then  statement.

Thoughts?

Not applicable
Author

Well, that did make the test document work a little better, but still not 100%.  There are still objects that are returning bad values.

Not applicable
Author

Interestingly (or perhaps oddly), it seems that the issue isn't necessarily the calculations, but the screen refreshing.  I've taken my original production document, removed 2/3 of the objects from the page in question and still get the same issue.  Two things are occuring, speed still seems slow for the amount happening on the page and several of the items simply don't update (or refresh) as selections are made.  So I've taken the formulas behind those objects and broken them into all their parts in seperate text objects to confirm they are all working and they are.

In addition I've added just one extra text object.  When the doc has items fail, I open the properties of that extra item, change the caption, click ok, it updates and then the rest of the page "catches up".  It's like the refresh is getting stuck.

Have I created the perfect storm of variables, set analysis and amount of items that I'm somehow causing the doc to fail?  I mean, this document is really not that complex (I don't think), yet here I am. 

Anyone care to chime in?

Not applicable
Author

Oh and this is happening in both my production (version 8.5) and test (version 10).

I have also since removed all objects, and looking only at the variable breakdowns in text boxes.  I have to sets of items, one text box with the variable, another with 5 text boxes that break down all the components of the variable.  When changing the inputs, the 5 boxes work perfectly, however the variable is intermittently failing.  Again, as above, grab the box, move it around and it updates, so the variable value is actually there, but the refresh isn't fully processing.

Not applicable
Author

Since I'm now basically grapsing at straws here, I've started tinkering with the dollar sign expansion.  Since the objects are not rendering when the variable is being calculated, I've move the burden to the object (which frankly sucks for performance), but seems to have solved the rendering issue since now all the individual items are recalculating the variable.

Anyone have any input here?  So far this is the best answer I have and it's not really a very good one.

johnw
Champion III
Champion III

sirguise wrote:

So let me put this out there, I'm no programmer (or even IT), I'm an accountant.  But I dabble in this stuff because I have a knack for it.  So I'll say up front there is a real chance there is a better way to do any of this stuff.

With that understanding out there, I've attached a test qvw and a word doc.  This qvw is essentially replicating the malfunctions I'm experiencing in my production document. 


And I'm no accountant, but I dabble in it.  I've designed and/or written a lot of custom accounting software over the years.

Anyway, your attachments appear to be missing.  Those would probably help.