We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Grid is slow and not using Multithreading

Configuration: Visual Studio 2022, C# WPA Blazor.

We used the Blazor Code Generator to create the grid and copied the drown down list from your example.

  1. Ver 0.01  The grid is slow at loading data using EF.
  2. Ver 0.02 Removed EF and upgraded to proprietary data loader and it is still slow. Showing no records.


We are looking to have the drop down list load at the same time it is loading the grid and the no records should show up only when there are no records. Fix the header text.

Grid Loading Process

From the next image, you can see the drop down list is loading. It shows no records, the headers are strange.

grid1.jpg

From the next image, you can see the spinner is working header is fixed with auto fit and shows no records.

grid2.jpg

From the final image, the 12 rows appear.

grid3.jpg




5 Replies

BL Balamurugan Lakshmanan Syncfusion Team March 14, 2023 03:23 PM UTC

Hi Dean,


Greeting from Syncfusion Support.


If you're experiencing slow performance in a Syncfusion Blazor grid, there could be several reasons why, but one possible reason is that the grid is not utilizing multithreading effectively. Here are some steps you can take to optimize the grid's performance:


1.Ensure that you're using the latest version of the Syncfusion Blazor grid. Newer versions may have performance improvements and bug fixes that can help with speed.


2.Check the size of the dataset being bound to the grid. If it's too large, consider using server-side pagination or virtual scrolling to reduce the amount of data that needs to be loaded into the grid at once.


3.Consider using lazy loading, which loads data into the grid only as it's needed. This can help improve performance if you have a large dataset.


By following these steps, you can optimize the performance of your Syncfusion Blazor grid and ensure that it's utilizing multithreading effectively. Please get back to us if you have further queries.


Regards,

Bala.



DP Dean Parker April 18, 2023 04:30 PM UTC

Do you not know that Syncfusion's Blazor datagrid placed on a webpage will give you no records error while loading webpage, css, java, data, etc.?



BL Balamurugan Lakshmanan Syncfusion Team April 19, 2023 09:57 AM UTC

Hi Dean,


We tried to reproduce the reported issue at our end. But we could not able to reproduce the reported issue at our end .

We have attached the online sample link and video demo for your reference. Kindly refer the attachment.


https://blazor.syncfusion.com/demos/datagrid/overview?theme=fluent


If you are still facing any other difficulties , Kindly share the below requested details:


     1. Share us the entire Grid code snippet.

    2.Kindly explain your requirement elaborately for better understanding.

    3.Share us a video demonstration of the issue.

    4.If possible kindly share us a simple issue reproduceable sample .


Above requested details will be very helpful in validating the reported query at our end and provide solution as early as possible.


Regards,

Bala.


Attachment: VideoDemo_f7d8b4e9.zip


DP Dean Parker May 8, 2023 07:40 PM UTC

  1. Are you not aware the datagrid shows "no records to display" before loading data?
  2. Are you not aware your examples all create sample data inside the webpage which faster because it avoids network latency, server response and the overhead of database communication?

You cannot expect us to accept your sample webpage that generates random data in the webpage which avoids real world latency and server overhead as a real world test.

Companies using your production are not generating sample random data in the webpage, we use using Oracle database servers, MySQL, Microsoft SQL.

Manual Video Demo...

  1. Look at Image 2
  2. Wait 4 seconds
  3. Look at image 3


This cannot not be any simpler, the grid displays no records to display​, while it loads the data.

Then shows data, the grid is telling the user NO DATA, but shows DATA.  Does the grid not know data is being loaded?



BL Balamurugan Lakshmanan Syncfusion Team May 11, 2023 09:03 AM UTC

Hi Dean,


Thanks for your patience.


We could be able to reproduce the reported issue at our end while preparing a sample as per your suggestion. We would like to inform you that when the Grid is loading data but before its rendering into the gird, the grid displays the text "No records to display" on the first row and it is the default behaviour. Once the data is loaded , it will update the UI. We have support for EmptyRecordTemplate in Grid. So, we suggest you to use the EmptyRecordTemplate to resolve your issues. Please refer the below attached code snippet and UG documentation for more details regarding this.


<SfGrid @ref="Grid" DataSource="@Orders" AllowFiltering="true" >

    <GridEvents OnLoad="LoadHandler"TValue="Order"></GridEvents>

    <GridTemplates>

        <EmptyRecordTemplate>

            <span>Loading Records</span>

        </EmptyRecordTemplate>

    </GridTemplates>

        

    </SfGrid>


 https://blazor.syncfusion.com/documentation/datagrid/how-to/customize-empty-grid-display-message/ 


Please get back to us if you have further queries.


Regards,

Bala.


Loader.
Live Chat Icon For mobile
Up arrow icon