Hi,
we are using your grid in our application to display different kind of data. Now we found out that there seems to be a huge memory leak in the grid. Everytime the grid gets refreshed, memory is leaked. It seems that it depends on the features that are used. I'll post my code to show you my test-environment:
$('#grid').igGrid({
columns: [{ headerText: "Product ID", key: "ProductID", dataType: "number", width: "100%" }, ], height: 400, width: 300, dataSource: [], rowVirtualization: true, columnVirtualization: false, virtualizationMode: 'fixed', features: [{ name: 'Filtering' }, { name: 'Updating' }, { name: 'Selection' }, { name: 'Sorting' }], primaryKey: 'ProductID', renderCheckboxes: true, autoGenerateColumns: false, avgRowHeight: 50, showHeader: true, });
I also added a button to set the data source a few times. This is the code to do so:
for (var i = 0; i < 50; i++) { $('#grid').igGrid('option', 'dataSource', []); }
Taking a look with IE 11 memory-analyzer shows that everytime the button is clicked, 250 KB are leaked. Using more of the grids features massively increases the amount. And the data is just an empty array.
It was intended to refresh the grid quite often, like every few seconds or so, but that's now a huge problem.
Are there any mistakes i made like setting the data the wrong way or anything else?
I'm using the latest version (14.1.20141.1020).
Kind regards
Lorenz Hrobarsch
Hello Lorenz,
Thank you for contacting Infragistics!
I have a few questions concerning this matter. Do you still see this memory leak when you don’t set a new datasource to the grid? Have you seen this in any other version of the product? What are the other features you use that massively increases the amount?
Hi Mike,
so to answer your questions:
1. No, memory usage stays constant when datasource stays the same.
2. Yes, same behaviour in the version we used befor 13.2.20132.1010)
3. Changing the the line with the features in the code above with this one
" features: [{ name: 'Filtering' }, { name: 'Updating' }, { name: 'Hiding' }, { name: 'Paging' }, { name: 'Resizing' }, { name: 'Selection' }, { name: 'ColumnMoving' }, { name: 'Sorting' }],"
for example increases memory usage by 12 MB everytime the button is clicked (so arround 240 KB on each refresh).
I hope this helps you to
Thanks in advance