Get Free Trial

Browser Is Hanging because of Flexmonster Interval Feature

Resolved
Albert Ryan Banez asked on August 5, 2021

Hi Flexmonster Team.
We have a chart here that is using interval feature. This chart gets a refresh every 1 minute. After 4 or so, The browser hangs. I think its a memory browser problem. 
How can we clear the memory on the go??
 
pivotgrid[cardId] = new Flexmonster({
container: “#pivot-container” + cardId,
licenseKey: “<%=ConfigurationManager.AppSettings[“FLEXMONSTER”]%>”,
componentFolder: “assets/plugins/flexmonster/”,
“width”: “1”,
“height”: “1”,
toolbar: false,
report: flex,
reportcomplete: function() {
pivotgrid[cardId].off(“reportcomplete”);
if (interval == true) {
if (refresh > 0) {
pivotgridrefresh[cardId] = setInterval(
function () {
placeFlexinGrid(url, sourcetype, cardId, cards, type, flex, referenceId, parameters, cnId, refresh, false, workflowId, bundleElementId, datasourceTitle);
},
refresh
);
}
}
}
});

1 answer

Public
Illia Yatsyshyn Illia Yatsyshyn Flexmonster August 9, 2021

Hello,
 
Please note that the origin of the interval and refresh variables cannot be retrieved from the provided code snippet. Also, there is no information about the used placeFlexinGrid function called with interval.
 
We suggest making sure that you update the data instead of creating new instances both of Flexmonster and the used charting library. It is achievable using the updateData API call. Otherwise, unused instances may trash the memory that leads to hanging.
 
King regards,
Illia

Please login or Register to Submit Answer