cd /news/ai-tools/why-your-net-ai-request-is-slow-a-se… · home › topics › ai-tools › article
[ARTICLE · art-177714] src=dev.to ↗ pub= topic=ai-tools verified=true sentiment=· neutral

Why your .NET AI request is slow: a segment-by-segment teardown

A developer built Runesvaner, an in-process profiler for .NET AI workloads that breaks a slow LLM request into six timed segments: queue, connect, upload, provider queue, time-to-first-token, and generation. The tool instruments each stage separately—using a Stopwatch, SocketsHttpHandler.ConnectCallback, an HttpContent wrapper, a MEAI decorator, and a stream wrapper—because general APM spans only flag the LLM call as "slow" without showing where the time went.

recommendation

Break LLM request latency into queue, connect, upload, provider-queue, TTFT and generation segments so you can pinpoint whether DNS, upload, provider queueing or streaming is the bottleneck.

more in playbook: Running AI in production
by read1 min views6 publishedNov 28, 2026

A support assistant answers in eight seconds. The HTTP span says 200 OK. The database span is fast. The LLM span is "slow". None of that tells you whether the time went into DNS, TLS, up the prompt, provider queueing, the first token, or streaming the answer.

General APM was designed for request/response services. LLM calls have a different shape:

Runesvaner is an in-process profiler for .NET AI workloads. This post walks through the measurement model and the numbers behind it — including what cannot be measured.

Segment What it means Source
Queue Middleware and serialization before the HTTP call Stopwatch
Connect DNS + TCP connection SocketsHttpHandler.ConnectCallback
Upload Request body serialization HttpContent wrapper
ProviderQueue Wait for response headers Stopwatch
TTFT First non-empty text delta MEAI decorator
Generation Response stream until EOF Stream wrapper
── more in #ai-tools 4 stories · sorted by recency
── more on @runesvaner 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/why-your-net-ai-requ…] indexed:0 read:1min 2026-11-28 · —