arrow_backRetour aux issues
the-momentum/open-wearables
#492
Débutant
Ouvrirarrow_forward
Débutant
Ouvrirarrow_forward
Débutant
Ouvrirarrow_forward
N+1 query in sync_vendor_data - batch data_source lookups and event_record inserts
ecoDébutant
good first issue
backend
performance
descriptionDescription
`sync_vendor_data_task` executes the same `SELECT … FROM data_source` query once per record during sync, resulting in an N+1 problem. In a single transaction the query pattern repeats **~85 times** alongside individual `INSERT INTO event_record` and `INSERT INTO event_record_detail` statements.
**Impact:** 255 occurrences detected on our internal instance since Feb 6. Adds unnecessary DB load on every vendor data sync.
**Fix:** Pre-fetch/cache `data_source` lookups before the loop and batch `event_record` / `event_record_detail` inserts using `bulk_save_objects` or `executemany`.
Issues similaires
calkit/calkit
star53
Poids du dépôt moyen
VS Code extension should be robust to YAML parser errors
Seeing this error: ``` Failed to read calkit.yaml: YAMLParseError: A block sequence may not be used as an implicit map…
Python
bug
good first issue
fu351/Doberman-Core
star211
Poids du dépôt léger
dash: a manual Refresh control
The dashboard polls: `refreshStats()` (`src/doberman/dash/app.py:408`) every 5 s and `refreshPending()` (`:546`) every …
Python
enhancement
good first issue
fu351/Doberman-Core
star211
Poids du dépôt léger
dash: "Copy details" button on each pending-approval card
Each pending-approval card in the dashboard (`renderPending`, `src/doberman/dash/app.py:448-544`) shows the risk badge,…
Python
enhancement
good first issue