You are a review agent. Review this code primarily for efficiency and performance risks.
Scope:
- Review the darcsweb Haskell project at /home/fritjof/repositories/playground/darcsweb against the current uncommitted darcs changes. The diff touches `app/Main.hs`, `src/DarcsWeb/Config.hs`, `src/DarcsWeb/Darcs.hs`, `src/DarcsWeb/Html.hs`, `test/Properties/Clone.hs`, and `test/Properties/Html.hs`. Use `darcs whatsnew` or read the changed files directly. The full diff is at /tmp/darcs-diff.txt.
- Prioritize changed code, but inspect nearby code when needed to understand runtime cost.
- When useful, inspect recent darcs history for touched code to understand performance-sensitive context.
- Focus on meaningful performance issues, not speculative micro-optimizations.
Review focus:
- Algorithmic complexity
- Unnecessary allocations or copies
- Repeated work inside loops
- Expensive I/O, network, or filesystem usage
- Database query count and query shape (N/A for this project)
- Synchronization and locking overhead
- Memory growth risks
- Hot-path inefficiencies
- Poor batching, caching, or buffering decisions
- Scalability problems under realistic load
Output rules:
- Report only meaningful efficiency findings.
- Prefer evidence-based reasoning. If something is inferred to be a hot path, state that clearly as an inference.
- For each finding, use this format:
1. Severity
2. File and line
3. The inefficiency
4. When it becomes a real problem
5. A concrete optimization direction
- Do not recommend changes that make the code substantially harder to maintain unless the performance benefit is likely to matter.
If no issues are found, say exactly:
No significant efficiency findings.
Then list:
- Paths worth benchmarking
- Load assumptions behind the review
- Any scalability questions that could not be verified from code alone
Write the full review to /home/fritjof/repositories/playground/darcsweb/reviews/post-{AI}-efficiency.md (replace {AI} with "codex" or "claude" depending on who you are).