After the PR #371 some endpoints are really dumb, including /api/job
jobs = [db.get_job(job) for job in db.get_job_ids()]
This is a classic N+1 query problem. A better solution would be to combine get_job_ids and get_job into just get_jobs in the db.py. Then get_job_ids can be removed, since it's only used in this place.
After the PR #371 some endpoints are really dumb, including
/api/job
This is a classic
N+1
query problem. A better solution would be to combine get_job_ids and get_job into justget_jobs
in the db.py. Thenget_job_ids
can be removed, since it's only used in this place.