Server module speed problems


I notice in my application these days when I do an that it can take a very long time before feedback is returned. Even for the simplest task. For example, consulting or modifying a table. When I put this same code directly in the program, i.e. not with a server module, it is lightning fast though. Has anyone also noticed these problems and do you have a solution? I work with the paid version.

Thanks in advance!

If you do a forum search on optimizing Anvil apps, you’ll see a lot of discussions about server functions. There are a lot of different techniques depending on the specifics of your app and your usage of server functions.

Without seeing any actual code, it’s impossible to give specific advice.

The strange part is that this was not a problem before. So my question is whether other people are also noticing this and it is over a performance problem along Anvil’s side or due to my configuration. My app is hosted on Anvil’s servers.


I, at least, am not seeing unusual delays in server calls in my apps. But without details on what you’re doing in your app, it’s hard to say if my usage of server calls is using the same set of features that yours are. You might be tickling a feature that recently got updated? Anvil is an ever changing platform, which is both good and bad sometimes.

Which python version are you using? Some of the full python 3 versions take longer than basic versions.

My solution is to generally have a basic python 3 server module for customer facing apps, and for things that I need packages unavailable in the basic version I break those out into separate apps and if possible I run background tasks to calculate and store data In data tables that are shared between the apps. Then I just read the precompiled data directly from the client on the user facing app. This of course breaks down if the package you need on the customer facing app is not available in one of the python versions that loads faster.

1 Like