Perform a focused performance review of changed code.
Chronicle / Event Sourcing
- Projections use AutoMap (on by default) — avoids manual mapping cost
- Projections do NOT join on the read model (forces full re-read)
- Reactors do NOT re-query the event log inside
On()— use event data directly - No eager loading of entire event sequences without paging/filtering
- New projections can replay all historical events without crashing
- Events are small — no large blobs or base64-encoded content embedded
MongoDB / Read Models
- Queries filter on indexed fields — no unintentional full-collection scans
- Paged queries use
.Skip()+.Take()— never load all rows - No N+1 pattern — single query returns all needed data
- Read-model records do not embed large nested collections that are never fully iterated
ASP.NET Core / Commands & Queries
- Query endpoints do not hydrate the full collection when only a count is needed
- Command validators are synchronous and in-memory — no I/O in validation
- No
await Task.Run(() => syncWork)wrapping for naturally async work - Response payloads include only fields the client uses — no over-fetching
React / TypeScript
-
DataTableuseslazy+paginatorfor collections larger than ~20 rows - No inline object/array literals passed as props (causes identity change every render)
-
useEffectdependencies are correct — no missing deps, no over-broad deps - Large-collection components wrapped in
React.memoor use stable references - No
JSON.parse(JSON.stringify(x))deep cloning
General .NET
- No LINQ
.ToList()before.Where()— filter before materialising -
IEnumerable<T>not enumerated multiple times — materialise once if needed - Large object logging uses
{@obj}only atDebuglevel
Risk classification
- 🔴 High — measurable degradation at moderate load — must fix before merge
- 🟡 Medium — could degrade under load or at scale
- 🟢 Low — minor inefficiency or style issue
Output format
Start with: Performance Review: ✅ No issues / ⚠️ Minor findings / ❌ Blocking issues found
Group findings by category. End with a summary table showing ✅/⚠️/❌ per category.