Skip to content

[tasks] Load only assignee ids in project tasks query#1149

Merged
frankrousseau merged 1 commit into
cgwire:mainfrom
frankrousseau:optim-project-tasks-assignees
Jul 10, 2026
Merged

[tasks] Load only assignee ids in project tasks query#1149
frankrousseau merged 1 commit into
cgwire:mainfrom
frankrousseau:optim-project-tasks-assignees

Conversation

@frankrousseau

Copy link
Copy Markdown
Contributor

Problems

  • GET /data/projects//tasks hydrated full Person rows (~48 columns, including password and 2FA secrets) just to serialize assignees as a list of ids, making the sync endpoint slow.

Solutions

  • Restrict the assignees eager-load to Person.id.

get_tasks_for_project used selectinload(Task.assignees), hydrating full
Person rows (~48 columns, including password and 2FA secrets) just to
serialize assignees as a list of ids. Restrict the eager load to
Person.id, cutting the batched assignee queries to a single column.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@frankrousseau
frankrousseau merged commit 43182fe into cgwire:main Jul 10, 2026
14 checks passed
@frankrousseau
frankrousseau deleted the optim-project-tasks-assignees branch July 10, 2026 12:46
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