# Memory Efficiency

Record: `arch:memory-efficiency`
Kind: quality-attribute
Layer: [Performance Core](https://banes-lab.com/records/layer/performance-core.md)
Severity: contextual
Scope: algorithm, process, stream
Canonical: https://banes-lab.com/ontology#arch-memory-efficiency

## Repair

- Refactored by: Stream, Chunk, Use Iterator
- Detected by: memory profile spikes
- Violated by: loading unbounded data into memory
- Measured by: peak memory, allocation rate
- Enforced by: memory benchmarks

## requires

- [Space Complexity Awareness](https://banes-lab.com/records/lex/space-complexity-awareness.md)

## reinforces

- [Scalability](https://banes-lab.com/records/arch/scalability.md)

## enables

- [Large Input Handling](https://banes-lab.com/records/lex/large-input-handling.md)

## conflicts-with

- [Full Materialization](https://banes-lab.com/records/lex/full-materialization.md)

## tensions-with

- [CPU Cost](https://banes-lab.com/records/lex/cpu-cost.md)

## tensions

- [Memory Efficiency CPU Cost](https://banes-lab.com/records/tension/cpu-cost-memory-efficiency.md)

## referenced-by

- [Single-Pass Processing](https://banes-lab.com/records/arch/single-pass-processing.md)
- [Lazy Evaluation](https://banes-lab.com/records/arch/lazy-evaluation.md)
- [Sequential Access](https://banes-lab.com/records/arch/sequential-access.md)
- [Flyweight Pattern](https://banes-lab.com/records/arch/flyweight-pattern.md)
