- Home
- Forum
- React - EJ 2
- Out of Memory error while 300k plus records are loaded in React Datagrid
Out of Memory error while 300k plus records are loaded in React Datagrid
I am getting out of memory error when trying to load 300K plus records in syncfusion react datagrid.
The issue arises while performing actions like searching and pagination. The whole grid itself becomes slow or not able to type inside the search box itself.
here are the error
Here is the sample code:
Hi Nandhini,
Greetings from Syncfusion Support.
Thanks for providing the code information of your grid. It seems when binding 300K records to the grid, upon performing searching and pagination in the grid, it throws out of memory error. We tried to replicate the issue by preparing a sample based on the provided grid code and implemented external input field for searching in grid. We cannot be able to replicate the issue from our end. We have attached the sample for your reference.
Sample: https://stackblitz.com/edit/react-e8ad9j-2mnqlx?file=index.js,index.html
To improve searching performance in grid when using large dataSet, we suggest you searchSettings.field property of grid. By using searchSettings.fields property, you can define specific fields in which you need to search the data. This will improve the performance of searching when grid as more columns and large set of data. We have attached the code snippet and documentation for your reference.
|
<GridComponent dataSource={virtualData} searchSettings={{ fields: ['FIELD2', 'FIELD3'] }} ref={(g) => (gridRef = g)}
|
Documentation: https://helpej2.syncfusion.com/react/documentation/grid/searching#search-specific-columns
We have also attached the documentation of optimizing the performance of Grid when binding large dataset with more number of columns in the grid.
Please provide the following information to validate this issue further.
- From the provided code snippet, it seems you are rendering columns from tableColumns array and visibleColumns array. Please provide us how many columns you are rendering in the grid.
- Please replicate the issue in the provided sample which will help us to validate this issue further.
We highly appreciate your co-operation in providing these details.
Regards,
Dineshnarasimman M
Attachment: GridSearching_f3a6b8d4.zip
- 1 Reply
- 2 Participants
-
NS Nandhini Shanmugam
- Nov 7, 2024 07:17 AM UTC
- Nov 12, 2024 04:23 PM UTC