A Span<T> cannot cross an await boundary
Keep span work between awaits. Carry memory or its backing buffer through asynchronous I/O.
Keep span work between awaits. Carry memory or its backing buffer through asynchronous I/O.
Compare a document’s source checksum, metadata, and ingestion profile before repeating extraction, chunking, embedding, and index writes.
Build stable lookup tables once with FrozenDictionary, reuse them across reads, and measure whether lookup savings justify the construction cost.
Use MultipartReader when buffered ASP.NET Core uploads put too much pressure on memory, temporary-disk capacity, or disk I/O.
Use async to avoid blocking while I/O is in flight, and treat CPU parallelism as a separate measured design decision.
Use Select to project only the required values before ToListAsync, reducing transferred columns and unnecessary entity materialization on EF Core read paths.
Skip EF Core change tracking for queries that only read entity data, but keep tracking for load-change-save updates.
Prefer Task unless you have a measured allocation reason and a simple consumption contract.
Watch for small per-item allocations inside loops, parsers, serializers, and request paths.
Use traces, counters, profiles, and focused benchmarks before changing code for performance.