Data Grid Pagination Issue

Hi, I have an app that is using the ‘data grid’ component to display the contents of a table. The table name is dynamic, which is coming from an API call, such as “https://xxxxxxxx.backendless.app/?table=a250_days&token=6000BD4-007-000000-0000-0000-000-000”. Everything was working fine, but when the content of the table is more than 3-4 thousand lines, it takes 3-4 minutes to load the data. During this time, the grid shows no rows, which seems like it’s waiting to load all the rows before displaying them. The issue is that the speed is unacceptable.

To fix this, I followed this tutorial for pagination, but now the entire data grid source is broken: How to integrate a Pagination with Data Grid component.

I need help, please. Is there a better way? I think the row data logic is bad.

If I remove this new pagination code and leave ‘data’ under Rows Data Logic, with the follwing setup, everything works.

Could you share a reproducible example with us? I believe the problem is that the component rerendered many times. But to confirm that, I should check it directly in the app, or you could set page size and page count in “On Page Enter” handler by yourself, and it will remove the unnecessary rerenders.

Also, it should not be related to the records count, as far as we load only one page(100 records)

It is definitely the table count. I reset it back to hundred and it works but then now I need the pagination to work. Do you have access to the app? if so, if you go to the orders table, you will see 5000 records there which you can use to test.

The table count takes me 180ms, and I am from EU.

Do you have access to the app?

Yes, but the problem is not related to the table or data retrieval (if it is done correctly). The issue is how the UI logic works. I have tried to check it on your pages directly, but unfortunately, it didn’t work because of a token or a missed table name(i guess). That is why I ask you for the minimal reproducible example which shouldn’t require additional steps. Is it possible?

Hi, I’m still stuck. Please use the ‘a248_orders’ table and any valid logged-in user token to access the page. The format to access the page is “https://xxxxxxxx.backendless.app/?table=a250_days&token=6000BD4-007-000000-0000-0000-000-000”. For now I have harcoded page size to 100 on page custom code so it loads.

Hi, @AD

We have already provided the next steps and possible solutions to the issue.

Could you share a reproducible example with us? I believe the problem is that the component rerendered many times. But to confirm that, I should check it directly in the app, or you could set page size and page count in “On Page Enter” handler by yourself, and it will remove the unnecessary rerenders.

As for:

Please use the ‘a248_orders’ table and any valid logged-in user token to access the page

I can’t get a user token because I haven’t any user in your system. Also, as I said earlier, we need a minimal reproducible example(it shouldn’t have a login).

I want to help you, but I can’t just get into your business logic and make it work. If you don’t want to waste your time and need just to get the working result, you can book our engineer, and he will solve it for you. For this purpose write to sales@backendless.com

Regards, Dima