Hi everyone,
When I update iggrid data then my browser's memory keeps increment.
It makes my browser is out of memory and reopen on IE 11. I used function: $(`${gridId}`).igGrid("dataSourceObject", data).igGrid("dataBind"); to update.
I checked the memory on Google chrome and I captured the result below:
After searching the first time, the data is about 400Mb
Then I research, the data is increased to more than 600Mb.
I want it only takes 400mb as the first searching.
Please give me some advice about this situation, let me know if you don't understand what I ask for, I will respond as soon as possible.
Thanks and best regards.
Trung
Hello Trung,
Thank you for using Infragistics forums!
Is it possible to share a sample that reproduces this memory leak or at least your grid configuration and the version of Ignite UI that you are using?
When I tried reproducing it with a small sample of my own I couldn't find anything suspicious. Here are my profiling results from MS Edge with each snapshot being taken after calling
$('#grid').igGrid("dataSourceObject", data).igGrid("dataBind");
I am looking forward to hearing from you!
Best regards,
Stamen Stoychev
Hi Stamen,
Thanks for your reply, I will try to make a sample for you. But before I finish it, can you test update a huge data on the IE11. I got a problem with ~5000 objects, each object has ~400 values. It only appears on IE11. That would be nice if you can use IE11 to test this. I know IgNiteUI is perfect for other browsers, but I want it to work well on IE11 too.
TrungNT
Hi Trung,
Using huge data shouldn't really present a memory leak that is otherwise not there. I created a sample with a generated data source containing 5000 rows with 400 properties each. It does increase the process memory to what you observed - ~400mb but it doesn't seem to further increase during rebinds:
The screenshot is from Edge because IE's profiler cannot take snapshots of this size without running out of memory.
I also ran the sample on IE and the graph seems to be stable. Of course during the rebind process the memory would increase but then it returns to the same plateau.
In either case showing so much data in IE is not possible without virtualization. With so many columns I would suggest using fixed virtualization and even column virtualization if you are not using features that are incompatible with it. These are the options I am using:
width: "1800px", height: "900px", rowVirtualization: true, // columnVirtualization: true, virtualizationMode: "fixed", avgRowHeight: "33px", defaultColumnWidth: "200px",
Without seeing more of your code I don't think I can find out why your memory increases two-fold on each rebind.
I'm using full features version - 18.0.72 licensed.
My grid has options like below:
Using 18.2.72 with my small sample and switching to continuous virtualization, multi-row-layout (the simplest possible just having the 400 columns on two rows of 200 each) and adding sorting to the feature list as per the code you shared, I still can't make the browser increase its memory footprint. My Chrome JavaScript VM memory usage stays at 246MB after 10 rebinds.
At this point if you could provide the sample you are reproducing this with it'll be of great help. Alternatively, you could check your databinding code to see if you are not incorrectly copying the data array coming from your server so that multiple instances of that data remain in memory.
On a side note, I noticed that if I click the data bind button more quickly than the browser can execute the operation for the memory increases quite a lot (similar to what you are experiencing), however, this is not a memory leak because additional items that the browser creates are garbage collectable. If you click the Collect garbage icon on Chrome dev tools (or in the case of IE, call window.CollectGarbage()) the memory usage returns to the normal amount.
I've checked the version base on the script you've given to me. It's 18.2.72.
Sorry about the version number I've given to you above, maybe I got a mistake about get version number.
So can you please check it once again?
Thanks and best regards,
I am not sure where you get the 18.0.x number from. Ignite UI releases are twice per year and the versions are 1 and 2 - e.g. it should be 18.1.x.
When running the grid could you please execute the following command in the browser's console?
$.ui.igGrid.version
This will give you the script version that I can then use to test against.
Stamen