Why LLM Tasks Stay Slow Even After Inference Speeds Up
This article explains why faster token generation does not automatically translate into faster task delivery in LLM applications. It separates three commonly confused metrics—tokens per second (TPS), time to first token (TTFT), and end-to-end task latency—and breaks down where time is actually spent across queuing, prefill, decoding, tool execution, retries, and aggregation. It then examines the multiplicative latency effect of agent loops, the observability data needed to locate bottlenecks, experience-layer improvements such as streaming and staged progress, and the link between latency, cost, and capacity. A practical checklist is included for teams that want to reduce real task latency rather than a single benchmark number.
Why LLM Tasks Stay Slow Even After Inference Speeds Up
Introduction: Fast Token Generation, Slow Task Delivery
A recently released model from a cloud provider drew attention in the developer community. The disclosed inference throughput figures were impressive: during off-peak hours, a single user could generate roughly 200 tokens per second, and even at peak times the rate held at 70 to 80 tokens per second. Yet a published hands-on test from the same period recorded a composite task involving physics computation and 3D animation generation taking nearly five hours end to end.
Placing these two sets of numbers side by side reveals the most important takeaway from this progress: generating a single token quickly is not the same as delivering a task quickly. This distinction is very real in the scheduling scenarios common to enterprises—what appears on a delivery timeline is “estimated task duration,” not “tokens emitted per second by the model.”
This article sets aside specific product attributes and abstracts the problem into a general engineering question: when the underlying inference speed is no longer the only bottleneck, what actually determines the end-to-end latency of an LLM application, and how should it be optimized systematically?
Concept Alignment: Three Kinds of “Speed” You Cannot Confuse
Before discussing performance, you must align on definitions. In engineering practice, at least three kinds of “speed” are used interchangeably:
- Token generation rate (TPS): the number of tokens the model outputs per second during the decoding phase, typically determined by memory bandwidth, batching strategy, and context length.
- Time to first token (TTFT): the time from sending a request to receiving the first token, mainly determined by queue wait, prompt length, and prefill computation.
- Task latency: from the user’s perspective, the total time from submitting a task to receiving a usable final result.
These three can differ by several orders of magnitude. At 200 tokens per second, outputting 2,000 words (about 3,000 tokens) takes only around 15 seconds. But if the task requires multiple rounds of tool calls, code execution, rendering, and validation, total time can quickly balloon to minutes or even hours. Optimizing only TPS means optimizing only the shortest segment of the entire chain.
Breaking Down Task Time: Where Do the Five Hours Go?
To locate the bottleneck, the first step is to decompose end-to-end time structurally. A typical long-chain task can be abstracted into the following stages:
total time = queue wait + prefill + decode + tool/environment execution + validation and retry + result aggregation
The time genuinely related to model decoding often accounts for only a small portion. Common “invisible costs” include:
- Queue and rate-limit waits: during peak concurrency, requests consume significant time at the gateway before anything else happens.
- Prefill overhead from context bloat: long documents, conversation history, and retrieved snippets are all concatenated into the prompt, and prefill computation grows roughly linearly or faster with length.
- Tool and sandbox execution: compilation, testing, rendering, and physics simulation are performed by external runtimes—unrelated to the model but serially blocking.
- Failure retries and loop fallbacks: when model output fails validation rules, regeneration repeats, forming an amplifying “generate—validate—regenerate” cycle.
- Serial orchestration: subtasks that could run in parallel are written as sequential calls.
An illustrative attribution of task time can be expressed as follows:
# Pseudocode: structured attribution of task timetotal = queue + prefill + decode + tool_exec + retry_overhead + aggregationdecode_ratio = decode / total# In practice, decode_ratio is often below 0.2, meaning the optimization focus is not decoding
When decode_ratio is very low, further compressing single-token latency yields minimal marginal benefit.
The Agent Loop: A Multiplicative Effect on Latency
Modern LLM applications generally adopt a loop structure of “model + tools + memory.” The performance characteristic of this structure is multiplicative rather than additive: a single round is fast, but the number of rounds consumes the entire budget.
A simplified loop looks like this:
for step in range(max_steps):resp = call_model(context) # one full round tripif resp.is_final:breakresult = run_tool(resp.tool_call) # external execution, may take tens of secondscontext += resp + result # context keeps growing
There are three easily overlooked performance traps here:
- Monotonically growing context: content is appended each round, so prefill cost increases with every subsequent round, accumulating to roughly quadratic overall.
- Serial blocking: the model sits idle while a tool executes, leading to low resource utilization.
- No early stopping: without clear success criteria and a step limit, the loop may fail to converge for a long time.
The engineering direction is clear: set dual budgets for steps and time, apply summarization and retrieval-based recall to the context, convert tool calls without dependencies into parallel execution, and route deterministic subtasks directly through rules or cache instead of the model.
Observability: No Segmented Instrumentation, No Optimization
You must be able to measure before you can optimize. It is recommended to establish a trace identifier that spans each task and to instrument key points:
| Stage | Key Metrics | What It Tells You |
|---|---|---|
| Gateway | Queue duration, rate-limit hits | Whether this is a capacity problem |
| Prefill | Input token count, TTFT | Whether the context is too long |
| Decode | Output token count, TPS | Whether the model side meets expectations |
| Tool | Single execution duration, failure rate | Whether the external runtime is the bottleneck |
| Loop | Number of rounds, retry count | Whether the loop converges |
With this table, “the task is slow” turns from a subjective impression into a locatable engineering problem. A common finding in practice is that more than half of end-to-end time is concentrated in tool execution and retries, not model decoding.
Experience-Layer Optimization: Turning “Waiting” into “Visible Progress”
Even if total duration cannot be reduced immediately, user perception can still be improved significantly. The core idea is early feedback and continuous feedback:
- Streaming output: render as soon as the first token arrives, turning imperceptible waiting into progressive presentation.
- Staged progress: return structured status to the caller, such as “retrieving / executing / validating,” instead of a single loading indicator.
- Asynchronous tasking: convert long-running tasks to a submit-and-poll or callback model, avoiding long-hanging connections.
{"stage": "tool_exec", "progress": 0.6, "message": "Running the validation step"}
The value of this design is that it shifts the user experience from “black-box waiting” to “predictable progress,” which in long-chain tasks is often more effective than simply increasing speed.
A Combined View of Cost and Capacity
Latency, cost, and capacity are three sides of the same coin. Peak-hour queuing is essentially an outward manifestation of a capacity constraint. General-purpose options include request tiering and priority queues, selecting models of different sizes by task type, semantic caching for repeated requests, front-loading stable, unchanging prefix content to reuse prefill results, and off-peak scheduling for non-real-time tasks. These are all industry-standard practices and involve no vendor-specific proprietary interfaces.
It is worth emphasizing that caching and reuse typically deliver far greater gains in long-chain tasks than switching to a faster model, because the outputs of many sub-steps are highly repetitive.
Implementation Checklist
- Are you measuring TTFT, TPS, and total task duration separately, rather than looking at a single metric?
- Have you performed segmented attribution of task time to identify the stage with the largest bottleneck?
- Does the agent loop have triple budgets for steps, time, and cost?
- Does the context have summarization, trimming, and retrieval recall mechanisms to avoid monotonic growth?
- Have tool calls without dependencies been parallelized?
- Have you introduced rules or caching for deterministic subtasks to bypass model calls?
- Do you provide streaming output and staged progress feedback?
- Have you established end-to-end tracing and alerting so performance regressions can be detected promptly?
Conclusion
“Fast single tokens, slow tasks” is not a contradiction; it is a reminder to developers: users are buying task completion, not decoding speed. As inference capability continues to improve, the focus of competition will shift from model metrics to pipeline engineering capability—task decomposition, concurrent orchestration, cache reuse, observability, and experience feedback. Only when these are done well will end-to-end latency truly drop and estimates on delivery timelines become credible.
