Loading app.... takes minutes

image
This sometimes takes minutes or gets stuck.
How come and how to solve this?

I would guess either your internet is slow or your app is massive. Maybe check that you aren’t including large files in your app (use a .gitignore)

(re)loading an app means:

  1. the app specification is generated / uploaded / checked / and applied to your development workspace
  2. the app.py file (or app dir) is imported in a Python process

In case your app consists of very large entity-types (i.e. huge parametrizations), the first bullet will indeed take longer (especially the checking/validation phase). Or as Remi points out, a slow internet connection obviously slows down the uploading step. Importing the app.py could also be slow when using certain Python packages.

You could run the viktor-connector in debug mode to see additional logs + timestamps, let’s see if we can pinpoint the slow part:

viktor-cli start --env VIKTOR_CONNECTOR_LOG_DEBUG=true
1 Like

Thanks a lot @khameeteman , i will use debug mode. To check what happens. Yes the venv is big and the directory also.
But I used to take like 20 seconds or so. That is why I was wondering.