Replace N+1 loop `for row in rows: db.execute(sql, row)` with single `db.execute(sql, rows)` — SQLAlchemy Session passes list-of-dicts as executemany, reducing round-trips to one per batch. Guard with `if rows:` so empty batches skip the execute. Update unit tests to reflect one call with a list instead of N calls with individual dicts. |
||
|---|---|---|
| .. | ||
| api | ||
| core | ||
| observability | ||
| schemas | ||
| services | ||
| tasks | ||
| __init__.py | ||
| main.py | ||