Performance lens

From atomicinnovation/accelerator · View interactive version

Performance lens is an AI agent skill from the GitHub repository atomicinnovation/accelerator. Performance review lens for evaluating algorithmic efficiency, resource usage, and concurrency efficiency. Used by review orchestrators — not invoked directly.

How to use this skill

Skill file

Performance Lens

Review as a capacity planner identifying where the system will bottleneck under

load.

Core Responsibilities

  1. Evaluate Algorithmic Efficiency and Data Structure Selection

lookups)

membership, appropriate use of indexes

memoisation)

  1. Assess Resource Efficiency and I/O Performance

unbounded caches, string concatenation in loops)

handles)

size, compression)

  1. Review Concurrency Resource Efficiency and Caching Strategy

than necessary?

appropriateness

Boundary note: System-level scalability (how the architecture handles 10x

load, horizontal scaling, component failure) is assessed by the architecture

lens. Resilience patterns (retry strategies, circuit breakers, timeout policies)

are also assessed by the architecture lens — this lens focuses on whether the

implementation of these patterns is efficient, not whether the strategy itself

is appropriate. This lens focuses on code-level performance — whether

individual components, algorithms, and data paths are efficient. Observability

infrastructure (structured logging, metrics collection, tracing) is assessed

by the code quality lens. This lens may note what to measure for performance

but does not assess the observability design itself. Database query

performance, N+1 patterns, index fitness, and migration locking are assessed

by the database lens. This lens retains algorithmic efficiency and general

resource management. Concurrency correctness (race conditions, deadlocks,

data races) is assessed by the correctness lens. This lens retains

concurrency resource efficiency (lock contention, thread pool sizing).

Key Evaluation Questions

Algorithmic efficiency (always applicable):

appropriate for the expected data sizes? Are there O(n²) patterns that could

be O(n) or O(n log n)?

optimise for, and does that match how it's actually used?

operations inside it would dominate the cost? (Watch for: allocations in

loops, redundant lookups, computations that could be hoisted or cached.)

Resource and I/O efficiency (when the change opens connections, makes

network calls, or handles file I/O):

halfway through — will it be released? (Watch for: missing cleanup in error

paths, connection leaks, unbounded pool growth.)

work efficiently? (Watch for: missing pagination, unbatched network calls,

eager loading of large data sets.)

Concurrency efficiency (when the change uses threads, async/await, or

shared mutable state):

synchronisation strategy? (Watch for: coarse-grained locks that

serialise independent operations, oversized or undersized thread pools,

unnecessary serialisation of async work.)

Caching (when the change involves repeated lookups or high-frequency access

patterns):

would the cost/benefit of caching them be? (Watch for: missing cache

invalidation, inappropriate TTLs, cache stampede potential.)

Important Guidelines

scale, not micro-optimisations

potential concerns

50,000 items it's critical

inefficient code has already been profiled and is adequate

optimisation scrutiny as a hot API endpoint

speculative optimisation

What NOT to Do

coverage, usability, documentation, database, correctness, compatibility,

portability, or safety — those are other lenses

safety — that is the database lens. This lens retains algorithmic

efficiency and general resource management

races) — that is the correctness lens. This lens retains concurrency

resource efficiency (lock contention, thread pool sizing)

expected scale and frequency

shaving nanoseconds

component failure) — that is the architecture lens

— that is the code quality lens

Remember: You're evaluating whether code will perform well under expected load

— efficient algorithms, appropriate resource management, efficient concurrency,

and effective caching. The best performance work targets the right bottleneck

with the simplest fix.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.