--- title: "Reducing Submission Latency" slug: "reducing-submission-latency" updated: 2026-08-25T11:09:02Z published: 2026-08-25T11:09:02Z canonical: "help.hyperscience.ai/reducing-submission-latency" --- > ## Documentation Index > Fetch the complete documentation index at: https://help.hyperscience.ai/llms.txt > Use this file to discover all available pages before exploring further. # Reducing Submission Latency > [!CAUTION] > **These values of the variables described in this article should not be edited unless you are advised to do so by your Hyperscience representative.** > > Adjusting each of these variables is helpful in specific circumstances and may have unintended results if changed in other contexts. > [!NOTE] > This article describes features that are available in v43 and later. The “.env” variables described below allow you to configure specific aspects of submission processing (e.g., the timing of the execution of tasks) to reduce the time required to process submissions. | Variable name | Description | | --- | --- | | `HYPERFLOW_ADVANCE_IN_WEB_SERVER` | Controls whether flows are advanced directly within the web server process when a task reaches a terminal state (e.g., `COMPLETED` or `FAILED`). Defaults to `false`. - **When** `true` — Reduces flow latency, as the next flow step begins immediately within the same request. However, this increases memory usage and request processing time in the web server. You may need to allocate additional resources or scale the web server accordingly. - **When** `false` — Flow advancement is handled by dedicated workflow engine workers. This configuration is better suited for high-throughput scenarios where higher latency is acceptable. - **Recommendation** — Set to `true` if low flow latency is a priority. Set to `false` if throughput is more important and some additional latency is tolerable. Do not set to `true` with `HYPERFLOW_DELAY_SUBWORKFLOW_START=false`, as doing so worsens HTTP request processing times. | | `HYPERFLOW_ACCELERATE_RESCHEDULE_OF_TERMINAL_TASKS` | Controls whether the system aggressively times out tasks suspected of being dropped by a workflow engine worker. Tasks can be dropped due to interference between multiple workers or abrupt worker process termination. Defaults to `false`. - **When** `true` — Improves worst-case flow latency in failure scenarios by detecting and rescheduling stuck tasks faster. Incurs a small overhead from additional database queries. - **When** `false` — Dropped tasks are eventually rescheduled via the standard reschedule interval `HYPERFLOW_ENGINE_RESCHEDULE_INTERVAL_SECONDS`). - **Recommendation** — Set to `true` if you need to minimize worst-case latency and can tolerate a minor increase in database query load. | | `HYPERFLOW_BACKUP_EXECUTION_CONTEXTS` | Controls whether execution contexts of completed flows are backed up to the file store synchronously during flow completion. Defaults to `true`. - **When** `true` — Backup happens synchronously as part of flow completion. This configuration keeps database disk usage low but adds latency to the completion step. - **When** `false` — Backup happens asynchronously in a separate background process. This reduces flow-completion latency but increases system resource usage and can temporarily increase database disk usage until the contexts are backed up and deleted. - **Recommendation** — Keep as `true` unless flow-completion latency is critical and you have sufficient database disk headroom and system resources to handle asynchronous backup. | | `HYPERFLOW_DELAY_SUBWORKFLOW_START` | Controls whether subflows that begin with a system task are started immediately or deferred to the next workflow engine loop iteration. Defaults to `true`. - **When** `true` — Subflow starts are deferred, which keeps HTTP request processing times short and reduces transaction duration. - **When** `false` — Subflows start immediately, which can improve both latency and throughput for flows that heavily use subflows. However, this configuration increases memory usage in workflow engine workers. - **Recommendation** — Set to `false` to improve subflow latency and throughput, provided your workers have sufficient memory. Do not set to `false` in combination with `HYPERFLOW_ADVANCE_IN_WEB_SERVER=true`, as doing so significantly degrades HTTP request performance. |