fix: remove repeated queries from source cards and dashboard #47

Merged
avm merged 1 commits from feature/mostovik-dashboard-performance into dev 2026-10-01 14:23:53 +03:00
Owner

Source cards waited 13 seconds because the latest background job was searched again for each historical row. Select latest jobs once on PostgreSQL, reuse dashboard source matches, and count staged snapshot rows only when no saved total exists.

Measured on one read-only dev database snapshot: sources 13.20 → 3.45 s cold and 10.19 → 0.24 s warm; dashboard 4.17 → 2.86 s. Full response payloads match.

Validation: 1773 tests passed, 38 skipped; PostgreSQL targeted suite 108 passed with one unrelated LOWER(date) failure also reproduced on base dev. Ruff, Django check and migration drift checks pass. No migrations or new settings.

Source cards waited 13 seconds because the latest background job was searched again for each historical row. Select latest jobs once on PostgreSQL, reuse dashboard source matches, and count staged snapshot rows only when no saved total exists. Measured on one read-only dev database snapshot: sources 13.20 → 3.45 s cold and 10.19 → 0.24 s warm; dashboard 4.17 → 2.86 s. Full response payloads match. Validation: 1773 tests passed, 38 skipped; PostgreSQL targeted suite 108 passed with one unrelated LOWER(date) failure also reproduced on base dev. Ruff, Django check and migration drift checks pass. No migrations or new settings.
avm added 1 commit 2026-10-01 14:19:47 +03:00
fix: avoid repeated task and source scans on dashboard
Some checks failed
Mostovik Backend CI/CD / Tests and lint (pull_request) Successful in 3m16s
Mostovik Backend CI/CD / Build linux/amd64 release images (pull_request) Has been skipped
Mostovik Backend CI/CD / Deploy dev (pull_request) Has been skipped
Mostovik Backend CI/CD / Deploy and verify internal main (pull_request) Has been skipped
Mostovik Backend CI/CD / Tests and lint (push) Failing after 3s
Mostovik Backend CI/CD / Build linux/amd64 release images (push) Has been skipped
Mostovik Backend CI/CD / Deploy dev (push) Has been skipped
Mostovik Backend CI/CD / Deploy and verify internal main (push) Has been skipped
fedd2e00a3
avm merged commit fedd2e00a3 into dev 2026-10-01 14:23:53 +03:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: avm/mostovik-backend#47