I have set up a file with a refresh interval of every second as below:
I am not sure if the code is correct but this appears to leak memory in Internet Explorer (I am using version 9), not sure about other browsers. I am doing it this way as I hoped that the destructor would release the memory because the leak also appears when using updateFromXml.
I can post the url if you want to see it and I can also decrease the interval to a tenth of a second as this shows up a bit quicker.
In case of IE - there is a problem with xml loading - IE uses active-x element for such task, and it is not affected by garbage collector ( at least not until page reloading )
Also, in common case, if you need just refresh grid you can use more simple approach
Yes, the appears to be stable, I will run this for several hours to check. Is there any way of the grid refresh just to change data values rather than ‘blink’ each time? Or is this just browser dependent?
Also, it possible to use previous approach but move clearAll command in xml itself, so clearing and new data rendering will be executed in single js cycle
This one at www.shodokan.net/griddhtmlx2.php
deviceRefreshInterval = setInterval( function() {
deviceList.clearAndLoadXML(“testGridxml.txt”); }, 1000 );
}
Yes, the data refreshes correctly, but let is run for some time refreshing every second and I think you will see that the memory usage creeps up. I am running shodokan.net/griddhtmlx.php, which contains:
I ran my tests overnight and all three appear to be stable in their memory usage. I will keep the tests running for the time being. Many thanks for your time.
I have started the evaluation by moving the prototype I have into using DHTMLX. I had to backtrack and set up a demo again as I think that there is still problem with memory usage.
The demo I have is at www.shodokan.net/nvr (with a lot of code removed or commented out), ignore the request for login details just click the login button to reach the main demo page. The grid refreshes every second and memory usage appears to be creeping up. Can you see the same?
It works not so bad on IE9 locally and seems has a zero memory consumption in IE10
Anyway, you can try to add one more interval and each few minutes call
CollectGarbage();
This is IE-specific method ( not related to dhtmlx ) which will force garbage collector run.
Refreshing on interval is bad practice, especially every second. You basically have javascript running constantly. Instead, you should just update grid data when necessary. Only update rows that change, when they change.
Get a guaranteed answer from DHTMLX technical support team
under the most suitable support plan