Difference in speed between Business and Dedicated

You can create your own custom environment and install any version of pymongo. See here for details: Anvil Docs | Installing Custom Packages

5 seconds sounds like a huge time. If your app imports some package that is very slow to load, you can try with lazy loading so you only load it when you really need it.

I’m in the middle of the usa, and my http endpoints with persistent server respond in less than 0.2 seconds. If you are close to London, you’ll get faster responses.

Here you can find a few tests: Latency dependence on geographical location

Try to compare the following 3:

  1. an http endpoint that immediately returns a string, defined in an empty app with only one module
  2. an http endpoint that immediately returns a string, defined in the app with slow response time
  3. the slow http endpoint, the real one

2.-1. will show what part of the 5 seconds is spent loading the interpreter and importing the packages

3.-2. will show the time spent doing the actual job

1.-0.2 seconds (from the usa) will show the time saved with persistent server