Preloaded runtime environment
A preloaded runtime environment is a special environment that enables you to reduce the cold start time of functions and to receive runtime updates automatically.
Initializing a runtime environment
When a function is deployed with a cold start invocation in a normal runtime environment, Cloud Functions starts the interpreter after receiving the function invocation request. Therefore, request processing time includes:
- Interpreter start time.
- Cloud Functions runtime component initialization time.
When a function is deployed with a cold start invocation in a preloaded runtime environment, the interpreter and the runtime components start before the request is processed. This reduces the response time.
Note
When the interpreter starts, custom environment variables are unknown to the preloaded runtime. They are set programmatically before the function code is initialized.
Updating a runtime environment
If a preloaded runtime environment is selected when creating a function version, it will be automatically updated in the function version settings to the latest version available in Cloud Functions.
If a normal runtime environment is selected when creating a function version, you will need to create a new version to update it.