Suggestions to optimize performance

I’m wondering if anyone has some general suggestions as to how to increase the performance of an app.

For instance, would an app generally perform better if server functions were moved to multiple server modules rather than having all functions in one module, e.g. each page has its own server module?

Or would it make sense to try to limit the number of server calls as much as possible? Any suggestion is welcome.

2 Likes

Very likely these two posts describes what you need:

Here are other posts that talk about client-server communication optimization.

EDIT
@shaun and @bridget, I listed only my posts because those are the ones I know, but it would be nice to have a few posts organized by topic (performance, data tables, DataGrid, javascript, custom components, etc.) listing the best posts about each topic. These should be maintained as Anvil grows and they get stale.

9 Likes

Great, thanks - I’ll try some of these suggestions.

Just made a proof of concept for this in a custom HTML component:
https://anvil.works/build#clone:ZA7ENWHOVT7D7CQ3=6RUAT5ZZEQ3CEF6UFIP2BQ6B

I did this based on some stack overflow forum suggestions, but made it so that you can have the infinite scroll apply to an item contained inside another component and specify a height for it. The data is loaded from a data table and returns data using offsets.

3 Likes