Skip to content

[codex] Reduce sample import mutation construction overhead - #596

Draft
matthuska wants to merge 1 commit into
codex/import-celery-result-pollingfrom
codex/import-mutation-construction-speedups
Draft

[codex] Reduce sample import mutation construction overhead#596
matthuska wants to merge 1 commit into
codex/import-celery-result-pollingfrom
codex/import-mutation-construction-speedups

Conversation

@matthuska

Copy link
Copy Markdown
Contributor

Summary

  • Remove the unused per-nucleotide-mutation Gene lookup from sample imports.
  • Replace linear scans for existing NT/CDS mutation objects with per-batch dictionary lookups.
  • Keep the same bulk create/update behavior and mutation relation construction.

Why

Large imports were doing repeated lookup work while constructing mutation objects. The removed Gene lookup did not feed persisted mutation data, and linear de-duplication became increasingly expensive within each batch.

Validation

  • python -m py_compile apps/backend/rest_api/data_entry/sample_import.py apps/backend/rest_api/data_entry/sample_entry_job.py
  • pre-commit hooks on commit

@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown

Report

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant