SF Grid throws 'Out of memory' error while trying to load 300k records

I am using 'Community Licence' of SyncFusion Blazor + VS2019. I am trying to display just one column of a table from MySql.

This is from the Razor page:

<SfGrid TValue="Employees" AllowPaging="true">
    <SfDataManager Url="/api/employees" Adaptor="Adaptors.WebApiAdaptor"></SfDataManager>
    <GridEditSettings  AllowAdding="false" AllowEditing="false" AllowDeleting="false" ></GridEditSettings>
    <GridColumns>
        <GridColumn Field="@nameof(Employees.emp_no)" IsPrimaryKey="true" Visible="false"></GridColumn>
        <GridColumn Field="@nameof(Employees.first_name)" Width="150"></GridColumn>        
    </GridColumns>
    <GridEvents TValue="Employees" OnActionFailure="Failure"></GridEvents>
</SfGrid>

Below is relevant part from controller:

        [HttpGet]
        [EnableCors("MyPolicy")]
        public object Get()
        {
            return new { Items = _context.employees, Count = _context.employees.Count() };          
        }

Below is relevant part from context class:

protected override void OnModelCreating(ModelBuilder modelBuilder)
        {
            modelBuilder.Entity<Employees>(entity =>
            {
                entity.ToTable("employees");          
            });

            OnModelCreatingPartial(modelBuilder);
        }

Below is the error in Chrome browser:

Debugging hotkey: Shift+Alt+D (when application has focus)
blazor.webassembly.js:1 Out of memory
blazor.webassembly.js:1    at Syncfusion.Blazor.Data.HttpHandler.SendRequest(HttpRequestMessage data)
blazor.webassembly.js:1    at Syncfusion.Blazor.Data.ODataAdaptor.<PerformDataOperation>d__15`1[[LibraryManagement.Shared.Models.Employees, LibraryManagement.Shared, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].MoveNext()
blazor.webassembly.js:1    at Syncfusion.Blazor.DataManager.<ExecuteQuery>d__147`1[[LibraryManagement.Shared.Models.Employees, LibraryManagement.Shared, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].MoveNext()
blazor.webassembly.js:1    at Syncfusion.Blazor.DataManager.<ExecuteQuery>d__146`1[[LibraryManagement.Shared.Models.Employees, LibraryManagement.Shared, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].MoveNext()
blazor.webassembly.js:1    at Syncfusion.Blazor.Grids.SfGrid`1.<GenerateAndExecuteQuery>d__306[[LibraryManagement.Shared.Models.Employees, LibraryManagement.Shared, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].MoveNext()
blazor.webassembly.js:1    at Syncfusion.Blazor.Grids.SfGrid`1.<DataProcess>d__305[[LibraryManagement.Shared.Models.Employees, LibraryManagement.Shared, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].MoveNext()

1 Reply

JP Jeevakanth Palaniappan Syncfusion Team February 8, 2021 12:49 PM UTC

Hi Sathya, 

Greetings from Syncfusion support. 

We have checked your query but we need more information to proceed further on this. So kindly provide us the below information. 

  1. Are you facing the issue in grid initial rendering or during any grid actions?
  2. Kindly share us the video demo of the issue.
  3. Are you facing this issue in local list binding itself or only when data is retrieved from database?
  4. Please share us the simple issue reproducing sample.

The above requested details will be helpful for us to validate the issue and provide you with a better solution as early as possible. 

Regards, 
Jeevakanth SP. 


Loader.
Up arrow icon