Repeating panel is slow to populate

The speedup from using a dict() rather than a table row is quite remarkable; so much so that is hard to see why it should ever be done any other way when the point of the webpage is to simply deliver, reformatted, the results of a table. And the ability to do so, on either the server or the browser side, is a single line of code. Instead of:

 repeating_panel_1.items=app_tables.[tablename].search(whatever)

all you need is:

repeating_panel_1.items= [dict(list(row) for row in app_tables[tablename].search(whatever)]

if the browser can retrieve the table, or the equivalent in a server function (with dict(row) instead of dict(list(row)) if it isn’t.

You give up lazy search of the datatables, but gain so many fewer trips to the server that it seems to me the use case for the first method is really restricted

I discovered them when a 40 line table was coming up in 50 seconds, reduced to 2.

1 Like