ContextIndex ContextIndex Performance journey
Nov 18 – Nov 28, 2026

Performance journey

How search, indexing and local chat changed on the owner’s laptop, from the first baseline to today.

473 runs473 measured23 milestones

Measured ms

99.5% less waiting for the first byte

Cold open of the indexing page on the dotnet/runtime index. Counts loaded separately.

Before38,091
After177
View data table

Measured gains

Search under load212.4×2.1 → 446requests/s · efcore · 20 concurrent usersChat generation5.8×24.8 → 144.7tokens/s · Qwen3 1.7B · CPU to RTXGPU embedding2×228.7 → 450.7chunks/s · e5-small · two to four sessions

The timeline 23 steps

Indexing §H.1 Measured

Search under load

Keep search responsive with 20 simultaneous users on efcore. Caching and indexed lookups let SQLite serve more requests per second.

Before 2.1 req/sAfter 446 req/s

Indexing §H.6 · through Nov 20 Measured

Choose a CPU embedding model

Compare five embedding models on the same 2,000 passages. Small e5 finished first on the idle CPU. Retrieval quality was evaluated separately.

e5-small int8 65.9 passages/sEmbeddingGemma 4-bit 17.1 passages/s

Chat models §2.1 Measured

The first local answers

Establish a CPU baseline for retrieval-assisted chat. Qwen2.5 answered the initial prompt and a German follow-up on 12 CPU threads.

Initial answer 59.9 tokens/sFollow-up 65.9 tokens/s
Chat models §2.2 · through Nov 21 Measured

Chat with project tools

Exercise the redesigned chat in real conversations. The initial retrieval-assisted answer arrived on CPU while the new interface also handled follow-ups and tool consent.

First token 1,775 ms
Chat models §2.8 · through Nov 24 Measured

Watch the owner's conversations

Compare the benchmark with real chat usage. Prompt lengths and load varied. These CPU conversations provide an observational baseline for Qwen3 4B.

Median generation 15.3 tokens/s

Chat models §2.3 Measured

The cost of reasoning

Time the same train problem with thinking disabled and enabled. Qwen3 1.7B generated a longer answer when thinking was enabled on the busy CPU.

Think off 4,300 msThink on 11,600 ms
Chat models §2.4 Measured

Move generation to the GPU

Measure how quickly Qwen3 1.7B writes an answer after reading a long prompt. Full Vulkan offload accelerated generation. The integrated Radeon fell back to CPU.

Chat models §2.5 · through Nov 24 Measured

Check the GPU before placement

Compare CPU and GPU generation during a short self-test. The RTX remained faster in this Qwen3 4B check, although other work on the laptop affected the rates.

Chat models §2.6 Measured

Share the GPU between chats

Find out whether two Qwen3 1.7B conversations can share one GPU. Two simultaneous chats increased combined output. Each conversation received only part of that throughput.

Chat models §2.7 · through Nov 22 Measured

Pin a model to a device

Check where a pinned chat model actually runs. The placement test recorded generation on both the CPU and the RTX.

Indexing §2 Measured

Phase 0 · Find the bottleneck

Trace a full dotnet/runtime checkout from files to vectors. Embedding occupied the CPU while the GPU sat idle. The baseline stopped before all vectors were written.

CPU low 6.2 chunks/sCPU high 7.9 chunks/s
Indexing §5.1 Measured

Phase 1b · Feed the GPU

Test whether more sessions can keep the RTX busy on e5-small fp16. With two concurrent callers, moving from two sessions to four almost doubled throughput.

Two sessions 228.7 chunks/sFour sessions 450.7 chunks/s
Indexing §5.2 · through Nov 26 Measured

Phase 1c · Overlap the indexing stages

Run the new pipeline end to end with EmbeddingGemma 4-bit. Both runs finished. The quieter machine and newer build improved the observed rate, so the difference cannot be attributed to the pipeline alone.

Under load 36.5 chunks/sQuiet machine 50.2 chunks/s
Indexing §5.3 Measured

Open the indexing page sooner

Show the page while its sections load independently. The cold first byte arrived much sooner. The knowledge counts continued loading afterward.

Before 38,091 msAfter 177 ms

Indexing §5.4 Measured

Search a runtime-sized index

Reduce the wait for a warm Dictionary resize query. The result stayed third in the top five while the median wait fell.

Before 1,309.3 msAfter 736.2 ms
Indexing §5.5 Measured

Leave GPU time for the desktop

Limit background indexing on the RTX with a duty-cycle budget. The lower budget left room for foreground work at the cost of a longer index.

100% repeat 57.2 s80% repeat 70.9 s

Indexing §5.6 Measured

Try a pool of devices

Test whether extra devices help the RTX finish an embedding stage. On this laptop, using all four devices took throughput below the RTX alone.

RTX alone 303 passages/sAll four 247 passages/s
Indexing §5.7 Measured

Change the GPU provider

Run e5-small fp16 through three providers on the same RTX. TensorRT for RTX gave the highest single-session rate in this workload. Background CPU load varied.

DirectML 323.4 passages/sTensorRT for RTX 1,137.3 passages/s
Indexing §5.8 Measured

Index a large PDF and slide deck

Measure extraction through storage with the per-file text cap. The deck and capped PDF went through the full pipeline on the shared laptop.

Wall time 10 s
Indexing §5.9 Measured

Keep CPU budget waits from stalling CI

Release thread-pool workers while indexing waits for CPU time. The stall regression passed after the fix. Full-index time on two processors stayed close to baseline.

Before 149.6 sAfter 152 s

Indexing §5.10 Measured

Repeat the multi-device trial

Include startup and verify each stored vector against the RTX reference. Opening slower devices cost time. Across the repeated trials, no combination reliably beat the RTX alone.

RTX including open 96.7 passages/s
Indexing §5.11 Measured

Search one million vectors

Test approximate search against exact neighbors at larger scale. With PostgreSQL as host, the Qdrant float32 run recovered the reference top ten.

Qdrant float32 100 % recall@10
Indexing §5.12 Measured

Take acceleration to Linux

Check which provider paths actually run in WSL 2. The standalone CUDA harness used the RTX. The product registration path on this host fell back to CPU.

CUDA harness, one session 3,099.2 passages/s