# Scan Directive

Target actual Odoo Python code with real optimization opportunities:

## Priority Areas

1. **ORM/models code** (`odoo/models/`) - Query building, record operations, field computation
2. **Cache system** (`odoo/tools/cache.py`) - Cache key computation, lookup, invalidation
3. **Query builder** (`odoo/tools/query.py`) - SQL query construction logic
4. **Utilities** (`odoo/tools/misc.py`, `odoo/tools/translate.py`) - Algorithmic work

## What to AVOID

- Code that primarily calls C extensions (PIL, lxml, psycopg2)
- Import-only overhead (unless explicitly targeting structure optimization)
- External library wrappers with minimal Python logic

## Scan Strategy

1. Find modules with substantial Python self-time (not C extension calls)
2. Use existing Odoo test suites where possible for benchmarking
3. Create minimal synthetic benchmarks only if necessary
4. Focus on algorithmic patterns that can be optimized (loops, data structures, redundant work)

## Test Availability

Odoo has extensive test suites in:
- `odoo/addons/base/tests/` - Core functionality tests
- `odoo/addons/*/tests/` - Module-specific tests
- Some may require database setup, but many are pure-Python unit tests
