Help Center/ FunctionGraph/ FAQs/ Invoking Functions/ Why Is It Slow to Invoke a Function for the First Time?
Updated on 2026-08-24 GMT+08:00

Why Is It Slow to Invoke a Function for the First Time?

The function experiences a cold start. Initialization or first‑time operations (such as loading code and dependencies) make the first request slower. Subsequent requests are faster as long as the container remains active. If there is no request within one minute, the container will be deleted.

For C# or Go, startup is slower due to runtime mechanisms. To improve performance:

  • Allocate more memory to the function.
  • Simplify function code, for example, delete unnecessary dependency packages.
  • When using C# in non-concurrent scenarios, you can also:

    Create a one-minute timer trigger to ensure that there is at least one active instance.