Does more packages and features mean slower server init?

I have a main app that I’m working on as well as a little toy one that I features/components on. I’m consistently finding that the server for the main app takes longer to initialize than the little toy one in the interactive UI window. Rendering the client code and server calls are pretty fast once the server is initialized.

** Does having more packages and features mean initializing the server takes longer? **

A bit more info on the toy and main apps

I have no data tables, packages or features on the toy app.

The main app has a user table with 2 rows. It has these features:

  • Users
  • Secrets
  • Google auth

It also has these packages:

  • Anvil extra
  • M3

The server code doesn’t do anything fancy on the main app; it looks for the current user in the user table and sets or returns some values from that row.

I think the bulk of the time is independent of the container complexity. I’m sure there are limits to this statement if you have a package that is large enough that transfer time becomes significant.

There seems to be Cold Start and Hot Start differences in server call time. The cold starts can be 20 seconds, while the hot starts can be 1 second.

Here is a dumb demo of a simple environment and a complex environment’s response time to a server call.

Simple (Minimal Environment)
Simple

Complex (Machine Learning Environment)
complex

I’ve been running all of the latency critical code in an Uplink to avoid having to wait for the container to be provisioned.