Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Mashup Objects not closable - huge performance issue

Hello,

I'm developing a Singe Page Application Mashup with lot's ob Sense Objects in it. I link the objects with the app.GetObject function.

When navigating through the Mashup it becomes slower and slower until it gets unusable. I profiled a bit and found out, that with the increasing count of registered objects, the count of watchers and the time for the digest cycle increases.

But I can't unregister the objects. Before I updated to Qlik Sense 3, there was that "close" function on the object model which is delivered by the promise of the GetObject function. However, I didn't notice, that this close function didn't change anything. Now that I have Qlik Sense 3, the close function is gone completely.

I also tried the following functions, because I thought it may help, but they didn't:

app.destroySenseObject(objectId)

object.destroyAllChildren
object.removeAllListeners
object.markAsCancelled

Please help!

Best Regards

Alex

4 Replies
Aiham_Azmeh
Employee
Employee

Hi alexander.johr‌,

One common way to do it is by storing the visualization models in an object and close them when needed:

var vizObjects = {};

function clean(){

     for(var vizId in vizObjects){

          vizObjects[vizId].close();

     }

}

[...]

app.getObject("QV01", "xyz"),then(function(model){

     vizObjects["xyz"] = model;

});

[...]

app.getObject("QV99", "abc"),then(function(model){

     vizObjects["abd"] = model;

});

//somewhere else under another route

clean();

... anyway something like that.

Unfortunately I couldn't found any example, maybe it's time to write one.

I hope this helps

Anonymous
Not applicable
Author

That's exactly what I do (or rather did) and what my question addresses.

But the close method was removed and now I get the error: TypeError: obj.close is not a function.

I'm using Qlik Sense Desktop 3.2 SR3. For version 2.x it worked fine.

Aiham_Azmeh
Employee
Employee

This looks like a bug, I will need to investigate

Onur_Can_Ak
Partner - Contributor
Partner - Contributor

I have the same issue on Qlik Sense June 2019. Close method not seems to work. Is there any alternative about this ?