Performance issues - server to client

I have a server function that returns just over 500 rows from a (non-datatable) query. It completes the server function in good time but takes forever building the DataGrid from code.

Is the pagination functionality exposed in some way as I’m sure the data table is paging in the server and not the client?

EDIT (2019-06-28):

I have put in some timing markers and the delay seems to be on the trip from the server module to the client. Is this link compressed (gzipped)?

Could you try returning the data as a list of dicts from your server function?

my_list_of_dicts = [dict(r) for r in app_tables.my_table.search()]

return my_list_of_dicts

I think this avoids some round-trips as described here

So I do return a list of dicts. The list has a length of 595 which then takes a long time to load into the DataGrid.

Is it possible to share a clone to the app?

Are there any linked rows?

(I’m just trying to guess at the moment)

Could you clone the app with the share functionality in Anvil? It will be easiest for others.

(click the :gear: icon and follow the instructions)

https://anvil.works/build#clone:CSPH6KPPEBV4IEWP=R45LLHRVXOO5FYWAI6FP55ZB

You can see both issues by running the sparql query in my other post.

For those watching, I think this post was continued in more detail here